]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] fs/locks.c: Fix lease_init
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 8 May 2006 03:02:42 +0000 (23:02 -0400)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 8 May 2006 15:07:17 +0000 (08:07 -0700)
commit34538510427c1a469e4632cca613443a3346bf2b
tree0de0ec3f7910ef24201ae2eaf3c3f4ae4cfcb7f7
parent6d0dde9a41466b84d87b25031205955b806c2bc4
[PATCH] fs/locks.c: Fix lease_init

It is insane to be giving lease_init() the task of freeing the lock it is
supposed to initialise, given that the lock is not guaranteed to be
allocated on the stack. This causes lockups in fcntl_setlease().
Problem diagnosed by Daniel Hokka Zakrisson <daniel@hozac.com>

Also fix a slab leak in __setlease() due to an uninitialised return value.
Problem diagnosed by Björn Steinbrink.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Tested-by: Daniel Hokka Zakrisson <daniel@hozac.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/locks.c