Skip to contentSkip to conversation

Fix cuse ENOMEM ioctl breakage in 4.20.0

PATCH In review Andreas Steinmetz 3 participants 6 messages Dec 30, 2018 – Aug 3, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix cuse ENOMEM ioctl breakage in 4.20.0

This must have happened somewhen after 4.17.2 and I did find it in 4.20.0:

cuse_process_init_reply() doesn't initialize fc->max_pages and thus all cuse bases ioctls fail with ENOMEM.

Patch which fixes this is attached.

Signature · 1 line
Andreas Steinmetz                       SPAMmers use [email protected]
fuse/cuse.c renamed from fs/fuse/cuse.c +1 -0
@@ -324,6 +324,7 @@
 	fc->minor = arg->minor;
 	fc->max_read = max_t(unsigned, arg->max_read, 4096);
 	fc->max_write = max_t(unsigned, arg->max_write, 4096);
+	fc->max_pages = FUSE_DEFAULT_MAX_PAGES_PER_REQ;
 
 	/* parse init reply */
 	cc->unrestricted_ioctl = arg->flags & CUSE_UNRESTRICTED_IOCTL;

A message that is not in the archive (sent off-list or not yet received): [email protected]

maintainer
#3 lore raw
Quoted 11 lines · Andreas Steinmetz
Quoted 11 lines · Andreas Steinmetz
Quoted 7 lines

This must have happened somewhen after 4.17.2 and I did find it in 4.20.0:

cuse_process_init_reply() doesn't initialize fc->max_pages and thus all cuse bases ioctls fail with ENOMEM.

Patch which fixes this is attached.

Thanks. Pushed a slightly different patch:

Quoted 7 lines
Quoted 2 lines

https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git/commit/?h=for-next&id=666a40e87038221d45d47aa160b26410fd67c1d2

It got broken again, ENONEM.
I do presume that commit 5da784cce4308ae10a79e3c8c41b13fb9568e4e0 is the culprit. Could you please fix this and, please, could somebody do a cuse regression test after changes to fuse?

Hi,

Can you please tell us which kernel is broken?

Thanks,
Miklos

Quoted 2 lines · Miklos Szeredi
#4 lore raw
Quoted 16 lines · Miklos Szeredi
Quoted 13 lines · Andreas Steinmetz
Quoted 13 lines · Andreas Steinmetz
Quoted 7 lines

This must have happened somewhen after 4.17.2 and I did find it in 4.20.0:

cuse_process_init_reply() doesn't initialize fc->max_pages and thus all cuse bases ioctls fail with ENOMEM.

Patch which fixes this is attached.

Thanks. Pushed a slightly different patch:

https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git/commit/?h=for-next&id=666a40e87038221d45d47aa160b26410fd67c1d2

Quoted 8 lines
Quoted 4 lines

It got broken again, ENONEM.
I do presume that commit 5da784cce4308ae10a79e3c8c41b13fb9568e4e0 is the culprit. Could you please fix this and, please, could somebody do a cuse regression test after changes to fuse?

Hi,

Can you please tell us which kernel is broken?

Did this ever get resolved?

totally confused,

greg k-h

maintainer
#5 lore raw
Quoted 23 lines · Greg Kroah-Hartman
Quoted 21 lines · Miklos Szeredi
Quoted 18 lines · Andreas Steinmetz
Quoted 13 lines · Andreas Steinmetz
Quoted 7 lines

This must have happened somewhen after 4.17.2 and I did find it in 4.20.0:

cuse_process_init_reply() doesn't initialize fc->max_pages and thus all cuse bases ioctls fail with ENOMEM.

Patch which fixes this is attached.

Thanks. Pushed a slightly different patch:

https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git/commit/?h=for-next&id=666a40e87038221d45d47aa160b26410fd67c1d2

It got broken again, ENONEM.
I do presume that commit 5da784cce4308ae10a79e3c8c41b13fb9568e4e0 is the culprit. Could you please fix this and, please, could somebody do a cuse regression test after changes to fuse?

Quoted 5 lines
Quoted 3 lines

Hi,

Can you please tell us which kernel is broken?

Did this ever get resolved?

Apparently yes, in v4.20.8 (f191c028cc33). No other kernel was affected, AFAICS.

Thanks,
Miklos

#6 lore raw
Quoted 25 lines · Miklos Szeredi
Quoted 23 lines · Greg Kroah-Hartman
Quoted 21 lines · Miklos Szeredi
Quoted 18 lines · Andreas Steinmetz
Quoted 13 lines · Andreas Steinmetz
Quoted 7 lines

This must have happened somewhen after 4.17.2 and I did find it in 4.20.0:

cuse_process_init_reply() doesn't initialize fc->max_pages and thus all cuse bases ioctls fail with ENOMEM.

Patch which fixes this is attached.

Thanks. Pushed a slightly different patch:

https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git/commit/?h=for-next&id=666a40e87038221d45d47aa160b26410fd67c1d2

It got broken again, ENONEM.
I do presume that commit 5da784cce4308ae10a79e3c8c41b13fb9568e4e0 is the culprit. Could you please fix this and, please, could somebody do a cuse regression test after changes to fuse?

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Hi,

Can you please tell us which kernel is broken?

Did this ever get resolved?

Apparently yes, in v4.20.8 (f191c028cc33). No other kernel was affected, AFAICS.

Wonderful, thanks for letting me know.

greg k-h