diff options
author | Paulo Alcantara <[email protected]> | 2020-11-28 15:57:06 -0300 |
---|---|---|
committer | Steve French <[email protected]> | 2020-11-30 15:23:31 -0600 |
commit | 6988a619f5b79e4efadea6e19dcfe75fbcd350b5 (patch) | |
tree | b96fd208d38e71366088e41e7078b9a79ae97efc /lib/test_overflow.c | |
parent | b65054597872ce3aefbc6a666385eabdf9e288da (diff) |
cifs: allow syscalls to be restarted in __smb_send_rqst()
A customer has reported that several files in their multi-threaded app
were left with size of 0 because most of the read(2) calls returned
-EINTR and they assumed no bytes were read. Obviously, they could
have fixed it by simply retrying on -EINTR.
We noticed that most of the -EINTR on read(2) were due to real-time
signals sent by glibc to process wide credential changes (SIGRT_1),
and its signal handler had been established with SA_RESTART, in which
case those calls could have been automatically restarted by the
kernel.
Let the kernel decide to whether or not restart the syscalls when
there is a signal pending in __smb_send_rqst() by returning
-ERESTARTSYS. If it can't, it will return -EINTR anyway.
Signed-off-by: Paulo Alcantara (SUSE) <[email protected]>
CC: Stable <[email protected]>
Reviewed-by: Ronnie Sahlberg <[email protected]>
Reviewed-by: Pavel Shilovsky <[email protected]>
Signed-off-by: Steve French <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions