smb/client: avoid dereferencing rdata=NULL in smb2_new_read_req()

This happens when called from SMB2_read() while using rdma
and reaching the rdma_readwrite_threshold.

Cc: stable@vger.kernel.org
Fixes: a6559cc1d35d ("cifs: split out smb3_use_rdma_offload() helper")
Reviewed-by: David Howells <dhowells@redhat.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>

authored by Stefan Metzmacher and committed by Steve French c724b2ab 5be63fc1

+1 -1
+1 -1
fs/smb/client/smb2pdu.c
··· 4441 4441 * If we want to do a RDMA write, fill in and append 4442 4442 * smbd_buffer_descriptor_v1 to the end of read request 4443 4443 */ 4444 - if (smb3_use_rdma_offload(io_parms)) { 4444 + if (rdata && smb3_use_rdma_offload(io_parms)) { 4445 4445 struct smbd_buffer_descriptor_v1 *v1; 4446 4446 bool need_invalidate = server->dialect == SMB30_PROT_ID; 4447 4447