]> git.baikalelectronics.ru Git - kernel.git/commit
dlm: check the write size from user
authorDavid Teigland <teigland@redhat.com>
Mon, 4 Feb 2013 21:31:22 +0000 (15:31 -0600)
committerDavid Teigland <teigland@redhat.com>
Mon, 4 Feb 2013 21:31:22 +0000 (15:31 -0600)
commit9a561bb7f54c4e7c7e342041e617eb41385876f5
treeab44da9a693c1e7fd22e5f45d26e1e7742281516
parentd9cd67b82dba30e73668b0df47e6a707d428bc5e
dlm: check the write size from user

Return EINVAL from write if the size is larger than
allowed.  Do this before allocating kernel memory for
the bogus size, which could lead to OOM.

Reported-by: Sasha Levin <levinsasha928@gmail.com>
Tested-by: Jana Saout <jana@saout.de>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/user.c