OSDN Git Service

CIFS: Mask off signals when sending SMB packets
authorPavel Shilovsky <piastryyy@gmail.com>
Tue, 5 Mar 2019 23:51:57 +0000 (15:51 -0800)
committerSteve French <stfrench@microsoft.com>
Wed, 6 Mar 2019 00:15:05 +0000 (18:15 -0600)
commitb30c74c73c787d853ecb9fcf5c59511a09a4ec59
tree5d5a8db44e3aa292a61dccbfbd9d87b8a876b11a
parentafc18a6f7b849a4935f3b4d782c902749b1580fd
CIFS: Mask off signals when sending SMB packets

We don't want to break SMB sessions if we receive signals when
sending packets through the network. Fix it by masking off signals
inside __smb_send_rqst() to avoid partial packet sends due to
interrupts.

Return -EINTR if a signal is pending and only a part of the packet
was sent. Return a success status code if the whole packet was sent
regardless of signal being pending or not. This keeps a mid entry
for the request in the pending queue and allows the demultiplex
thread to handle a response from the server properly.

Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/transport.c