From: David Teigland Date: Thu, 18 Jun 2009 18:20:24 +0000 (-0500) Subject: dlm: fix plock use-after-free X-Git-Tag: v2.6.31-rc4~49^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c78a87d0a1fc885dfdbe21fd5e07787691dfb068;p=pandora-kernel.git dlm: fix plock use-after-free Fix a regression from the original addition of nfs lock support 586759f03e2e9031ac5589912a51a909ed53c30a. When a synchronous (non-nfs) plock completes, the waiting thread will wake up and free the op struct. This races with the user thread in dev_write() which goes on to read the op's callback field to check if the lock is async and needs a callback. This check can happen on the freed op. The fix is to note the callback value before the op can be freed. Signed-off-by: David Teigland --- Reading git-diff-tree failed