]> git.baikalelectronics.ru Git - kernel.git/commit
CIFS: Fix null pointer deref during read resp processing
authorPavel Shilovsky <pshilov@microsoft.com>
Mon, 10 Apr 2017 17:31:33 +0000 (10:31 -0700)
committerSteve French <smfrench@gmail.com>
Tue, 11 Apr 2017 04:36:38 +0000 (23:36 -0500)
commitd8f45fe50d989406a7d34ddf2f4d55ce16de18ed
treec02cd0c1e5bdf4b1cb58b4dcd307f508f02fda73
parent35c714d7d03cd87ccde0a7dee746242a4bcd1dc8
CIFS: Fix null pointer deref during read resp processing

Currently during receiving a read response mid->resp_buf can be
NULL when it is being passed to cifs_discard_remaining_data() from
cifs_readv_discard(). Fix it by always passing server->smallbuf
instead and initializing mid->resp_buf at the end of read response
processing.

Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
CC: Stable <stable@vger.kernel.org>
Acked-by: Sachin Prabhu <sprabhu@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
fs/cifs/cifsproto.h
fs/cifs/cifssmb.c
fs/cifs/smb2ops.c