Re: [PATCH] devpts: If initialization failed, don't crash when opening /dev/ptmx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/07/2015 06:59 PM, Andrew Morton wrote:
> On Wed, 6 May 2015 17:35:47 -0700 Josh Triplett <josh@xxxxxxxxxxxxxxxx> wrote:
> 
>> 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.
> 
> It looks like the system is pretty crippled if init_devptr_fs() fails. 
> Can the user actually get access to consoles and do useful things in
> this situation?  Maybe it would be better to just give up and panic?

A single-user console is definitely reachable without devpts.
>From there, one could fixup to a not-broken kernel.

Regards,
Peter Hurley

PS - But I saw you already added these to -mm

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]