summaryrefslogtreecommitdiff
path: root/fs/cifs/cifsproto.h
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilov@microsoft.com>2017-04-10 10:31:33 -0700
committerSteve French <smfrench@gmail.com>2017-04-10 23:36:38 -0500
commit350be257ea83029daee974c72b1fe2e6f1f8e615 (patch)
treec02cd0c1e5bdf4b1cb58b4dcd307f508f02fda73 /fs/cifs/cifsproto.h
parentc08e611b7d0169b513e3b4515ffd51ac7f37f22c (diff)
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>
Diffstat (limited to 'fs/cifs/cifsproto.h')
-rw-r--r--fs/cifs/cifsproto.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
index ec5e5e514fdd..97e5d236d265 100644
--- a/fs/cifs/cifsproto.h
+++ b/fs/cifs/cifsproto.h
@@ -79,8 +79,7 @@ extern void cifs_delete_mid(struct mid_q_entry *mid);
extern void cifs_wake_up_task(struct mid_q_entry *mid);
extern int cifs_handle_standard(struct TCP_Server_Info *server,
struct mid_q_entry *mid);
-extern int cifs_discard_remaining_data(struct TCP_Server_Info *server,
- char *buf);
+extern int cifs_discard_remaining_data(struct TCP_Server_Info *server);
extern int cifs_call_async(struct TCP_Server_Info *server,
struct smb_rqst *rqst,
mid_receive_t *receive, mid_callback_t *callback,