fix smb3-encryption breakage when CONFIG_DEBUG_SG=y
authorRonnie Sahlberg <lsahlber@redhat.com>
Tue, 20 Feb 2018 01:45:21 +0000 (12:45 +1100)
committerSteve French <stfrench@microsoft.com>
Mon, 2 Apr 2018 01:24:40 +0000 (20:24 -0500)
commit262916bc69faf90104aa784d55e10760a4199594
tree70490ac9414d0ae727ca55a22ab4d7b1531f0777
parent70e80655f58e17a2e38e577e1b4fa7a8c99619a0
fix smb3-encryption breakage when CONFIG_DEBUG_SG=y

We can not use the standard sg_set_buf() fucntion since when
CONFIG_DEBUG_SG=y this adds a check that will BUG_ON for cifs.ko
when we pass it an object from the stack.

Create a new wrapper smb2_sg_set_buf() which avoids doing that particular check
and use it for smb3 encryption instead.

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
CC: Stable <stable@vger.kernel.org>
fs/cifs/smb2ops.c