diff options
| author | Miklos Szeredi <mszeredi@redhat.com> | 2026-03-26 11:45:44 +0100 |
|---|---|---|
| committer | Miklos Szeredi <mszeredi@redhat.com> | 2026-04-02 20:43:24 +0200 |
| commit | e45f591f704aecec31dc738694a5e43acdfd020b (patch) | |
| tree | c5bc2d11c896cca0d65751d5135df399f80d685b | |
| parent | da6fcc6dbddbef80e603d2f0c1554a9f2ac03742 (diff) | |
fuse: check connection state on notification
Check if the connection is fully initialized and connected before trying to
process a notification form the fuse server.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
| -rw-r--r-- | fs/fuse/dev.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 8d5bab05adf4..952dd56f0a02 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -2098,6 +2098,13 @@ static int fuse_notify_prune(struct fuse_conn *fc, unsigned int size, static int fuse_notify(struct fuse_conn *fc, enum fuse_notify_code code, unsigned int size, struct fuse_copy_state *cs) { + /* + * Only allow notifications during while the connection is in an + * initialized and connected state + */ + if (!fc->initialized || !fc->connected) + return -EINVAL; + /* Don't try to move folios (yet) */ cs->move_folios = false; |
