]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cifs: handle -EINTR in cifs_setattr
authorRonnie Sahlberg <lsahlber@redhat.com>
Thu, 8 Oct 2020 23:32:56 +0000 (09:32 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Nov 2020 10:08:44 +0000 (11:08 +0100)
commit80dc9c4266b5696e797bded1d0f6087446d7cf9d
tree857781d2516e2145d23701aae5989c8b10da6baa
parent6a253f385a2dc9f6a5a1da828e0e9e07f6f9d9b9
cifs: handle -EINTR in cifs_setattr

[ Upstream commit c6cc4c5a72505a0ecefc9b413f16bec512f38078 ]

RHBZ: 1848178

Some calls that set attributes, like utimensat(), are not supposed to return
-EINTR and thus do not have handlers for this in glibc which causes us
to leak -EINTR to the applications which are also unprepared to handle it.

For example tar will break if utimensat() return -EINTR and abort unpacking
the archive. Other applications may break too.

To handle this we add checks, and retry, for -EINTR in cifs_setattr()

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/cifs/inode.c