diff options
author | Suresh Jayaraman <sjayaraman@suse.de> | 2010-03-31 12:00:03 +0530 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-04-03 17:24:20 +0000 |
commit | 6513a81e9325d712f1bfb9a1d7b750134e49ff18 (patch) | |
tree | f0f00a27d29ad6b6dc7cb05f6b10101aa01b0c64 /drivers/gpio/mcp23s08.c | |
parent | a24e2d7d8f512340991ef0a59cb5d08d491b8e98 (diff) | |
download | linux-6513a81e9325d712f1bfb9a1d7b750134e49ff18.tar.bz2 |
cifs: Fix a kernel BUG with remote OS/2 server (try #3)
While chasing a bug report involving a OS/2 server, I noticed the server sets
pSMBr->CountHigh to a incorrect value even in case of normal writes. This
results in 'nbytes' being computed wrongly and triggers a kernel BUG at
mm/filemap.c.
void iov_iter_advance(struct iov_iter *i, size_t bytes)
{
BUG_ON(i->count < bytes); <--- BUG here
Why the server is setting 'CountHigh' is not clear but only does so after
writing 64k bytes. Though this looks like the server bug, the client side
crash may not be acceptable.
The workaround is to mask off high 16 bits if the number of bytes written as
returned by the server is greater than the bytes requested by the client as
suggested by Jeff Layton.
CC: Stable <stable@kernel.org>
Reviewed-by: Jeff Layton <jlayton@samba.org>
Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'drivers/gpio/mcp23s08.c')
0 files changed, 0 insertions, 0 deletions