]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: Limit memory used by lock request calls to a page
authorRoss Lagerwall <ross.lagerwall@citrix.com>
Tue, 8 Jan 2019 18:30:56 +0000 (18:30 +0000)
committerSteve French <stfrench@microsoft.com>
Fri, 11 Jan 2019 13:14:40 +0000 (07:14 -0600)
commitb0498830b81f2dcb77da1e77346e0a926068fe75
treebf25221c25731b147937ae58efdf15c54be3e19a
parentd75cc2033add4215d2dd14e35ca9df66f9a82520
cifs: Limit memory used by lock request calls to a page

The code tries to allocate a contiguous buffer with a size supplied by
the server (maxBuf). This could fail if memory is fragmented since it
results in high order allocations for commonly used server
implementations. It is also wasteful since there are probably
few locks in the usual case. Limit the buffer to be no larger than a
page to avoid memory allocation failures due to fragmentation.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/file.c
fs/cifs/smb2file.c