mirror of
https://github.com/torvalds/linux.git
synced 2026-10-23 15:32:04 +02:00
mount_opts.max == 0 is consumed as ida_alloc_max(..., max - 1), which wraps to 0xffffffff. The IDA layer treats a negative max as INT_MAX, so "mount -t devpts -o max=0" does not disable ptys - it lifts the per-instance limit entirely and only the global kernel.pty.max still applies. Reject the value at parse time: $ mount -t devpts -o max=0 pt /tmp/pt mount: /tmp/pt: wrong fs type, bad option, bad superblock... No userspace relies on 0 meaning "unlimited": runc and crun never set max=, and LXC, the only runtime that does, omits the property entirely when the configured value is 0. The value has never been validated since the option was introduced, so there is no Fixes tag. Signed-off-by: Tao Cui <cuitao@kylinos.cn> Link: https://patch.msgid.link/20260903033625.1042796-1-cui.tao@linux.dev Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org> |
||
|---|---|---|
| .. | ||
| inode.c | ||
| Makefile | ||