[PATCH] fs/locks.c: Fix lease_init (CVE-2006-1860)
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 8 May 2006 03:02:42 +0000 (23:02 -0400)
committerChris Wright <chrisw@sous-sol.org>
Thu, 11 May 2006 01:56:15 +0000 (18:56 -0700)
commit1f0e637c94a9b041833947c79110d6c02fff8618
treeae48fe2d180c18ec056d26c58bdeb153e15f2656
parent90a03936acb1c3400a5833cc7b5c58e01b6106b8
[PATCH] fs/locks.c: Fix lease_init (CVE-2006-1860)

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>
Cc: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
fs/locks.c