]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
dlm: make find_rsb() fail gracefully when namelen is too large
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 26 Jan 2008 04:22:26 +0000 (23:22 -0500)
committerDavid Teigland <teigland@redhat.com>
Mon, 4 Feb 2008 07:26:31 +0000 (01:26 -0600)
commitef58bccab7c7ef34451aa4ceea39545ef126b666
tree56cdbdeba5db2cdca3e3f96a7124a4f83c56e791
parenta5dd06313dbcec3a2c8a5e4a6f3ddb2a8fc72ec9
dlm: make find_rsb() fail gracefully when namelen is too large

We *can* get there from receive_request() and dlm_recover_master_copy()
with namelen too large if incoming request is invalid; BUG() from
DLM_ASSERT() in allocate_rsb() is a bit excessive reaction to that
and in case of dlm_recover_master_copy() we would actually oops before
that while calculating hash of up to 64Kb worth of data - with data
actually being 64 _bytes_ in kmalloc()'ed struct.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/lock.c