]> git.baikalelectronics.ru Git - kernel.git/commit
dlm: validate messages before processing
authorDavid Teigland <teigland@redhat.com>
Wed, 9 Jan 2008 15:59:41 +0000 (09:59 -0600)
committerDavid Teigland <teigland@redhat.com>
Wed, 30 Jan 2008 17:04:42 +0000 (11:04 -0600)
commitd2c92aa854073d2d693c212c84a74aa0b0dca8fd
tree753945bb24638e9798220b2880650b4ba3211e40
parenta151e79fc4eadc65fce4db885edc229d929e3e5b
dlm: validate messages before processing

There was some hit and miss validation of messages that has now been
cleaned up and unified.  Before processing a message, the new
validate_message() function checks that the lkb is the appropriate type,
process-copy or master-copy, and that the message is from the correct
nodeid for the the given lkb.  Other checks and assertions on the
lkb type and nodeid have been removed.  The assertions were particularly
bad since they would panic the machine instead of just ignoring the bad
message.

Although other recent patches have made processing old message unlikely,
it still may be possible for an old message to be processed and caught
by these checks.

Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/lock.c