summaryrefslogtreecommitdiff
path: root/components/external/jpeg/makecdsp.vc6
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2026-11-16 11:29:11 +0800
committerGitHub <[email protected]>2026-11-16 11:29:11 +0800
commit7c974b59fdc258afbdb19c378f250bcd95511537 (patch)
tree66ab0f2b15f8ce972cda4a237cc9f0323f09bc63 /components/external/jpeg/makecdsp.vc6
parent43791bbf2e618414fa6d59c56831b6909d05f611 (diff)
fix(ptyfs): release the pts file on unregister (#12029)HEADmaster
* fix(ptyfs): release the pts file on unregister ptyfs_unregister_pts() removed the pts file from the root list and recycled its unit number but never freed the allocation. Repeated open/close of /dev/pts/ptmx therefore leaked one struct ptyfs_file per cycle and eventually exhausted the kernel heap. Free the file after unlinking it. Also initialize pts_unit to -1 so a failed registration does not unregister unit 0, detach the condvars before freeing the softc on the lwp_tty_create() failure path, and skip rt_device_unregister() for a tty that was never registered. * fix(dfs): keep ptyfs files alive for concurrent readers ptyfile_lookup() returned a raw pointer after releasing sb->lock, while ptyfs_unregister_pts() removed and freed the same node. A concurrent getdents(), setattr() or vnode lookup could then read freed memory. Add a reference count protected by sb->lock: lookup takes a reference and the last ptyfile_put() frees the node. The root list reference is dropped when the file is removed, so unregistering a pts no longer frees a file that a reader still uses. getdents() also holds the lock while walking the subdir list, keeping the entries alive during the copy.
Diffstat (limited to 'components/external/jpeg/makecdsp.vc6')
0 files changed, 0 insertions, 0 deletions