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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Apr 2018 07:36:26 +0000 (09:36 +0200)
commitbf895b2a637dc4bbe818cabf1fa2c91a2f346dfd
tree50c99b3f8b1dfd354437009a710cee71626ad001
parentfdbd795405203c22c063690f00cf79a23389f1df
fix smb3-encryption breakage when CONFIG_DEBUG_SG=y

commit 262916bc69faf90104aa784d55e10760a4199594 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/smb2ops.c