summaryrefslogtreecommitdiff
path: root/fs/mount.h
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2020-05-14 17:44:24 +0300
committerMiklos Szeredi <mszeredi@redhat.com>2020-05-14 17:44:24 +0300
commit530f32fc370fd1431ea9802dbc53ab5601dfccdb (patch)
tree05516acbce7aa3cca6acdf07dc0a06fc8c61cfe4 /fs/mount.h
parenta3c751a50fe6bbe50eb7622a14b18b361804ee0c (diff)
downloadlinux-530f32fc370fd1431ea9802dbc53ab5601dfccdb.tar.xz
aio: fix async fsync creds
Avi Kivity reports that on fuse filesystems running in a user namespace asyncronous fsync fails with EOVERFLOW. The reason is that f_ops->fsync() is called with the creds of the kthread performing aio work instead of the creds of the process originally submitting IOCB_CMD_FSYNC. Fuse sends the creds of the caller in the request header and it needs to translate the uid and gid into the server's user namespace. Since the kthread is running in init_user_ns, the translation will fail and the operation returns an error. It can be argued that fsync doesn't actually need any creds, but just zeroing out those fields in the header (as with requests that currently don't take creds) is a backward compatibility risk. Instead of working around this issue in fuse, solve the core of the problem by calling the filesystem with the proper creds. Reported-by: Avi Kivity <avi@scylladb.com> Tested-by: Giuseppe Scrivano <gscrivan@redhat.com> Fixes: c9582eb0ff7d ("fuse: Fail all requests with invalid uids or gids") Cc: stable@vger.kernel.org # 4.18+ Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/mount.h')
0 files changed, 0 insertions, 0 deletions