summaryrefslogtreecommitdiffstats
path: root/arch/arc
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2015-06-30 14:58:27 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-06-30 19:44:58 -0700
commit9ce71148b027e2bd27016139cae1c39401587695 (patch)
treeeef99b06deb475d3f52d553b2d71dfa7fd70f7a1 /arch/arc
parent15f1d827810e085496eb7ae82aa3ed2dba9901cc (diff)
downloadlinux-9ce71148b027e2bd27016139cae1c39401587695.tar.gz
linux-9ce71148b027e2bd27016139cae1c39401587695.tar.bz2
linux-9ce71148b027e2bd27016139cae1c39401587695.zip
devpts: if initialization failed, don't crash when opening /dev/ptmx
If devpts failed to initialize, it would store an ERR_PTR in the global devpts_mnt. A subsequent open of /dev/ptmx would call devpts_new_index, which would dereference devpts_mnt and crash. Avoid storing invalid values in devpts_mnt; leave it NULL instead. Make both devpts_new_index and devpts_pty_new fail gracefully with ENODEV in that case, which then becomes the return value to the userspace open call on /dev/ptmx. [akpm@linux-foundation.org: remove unneeded static] Signed-off-by: Josh Triplett <josh@joshtriplett.org> Reported-by: Fengguang Wu <fengguang.wu@intel.com> Reviewed-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/arc')
0 files changed, 0 insertions, 0 deletions