summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/python_version.py
diff options
context:
space:
mode:
authorTao Cui <cuitao@kylinos.cn>2026-09-03 11:36:25 +0800
committerChristian Brauner <brauner@kernel.org>2026-09-04 12:57:46 +0200
commit7d1d1a34d29cb8f1956c7a3c207503e2f18cc0cc (patch)
treec22245e120abfa75d701fe4aaa798ec6df57138b /tools/lib/python/kdoc/python_version.py
parent4dda2f40edd811a0637b2036734c594a685767f2 (diff)
devpts: reject max=0 instead of silently lifting the limit
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>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions