Messages in this thread | | | Date | Thu, 31 Mar 2011 15:52:22 +0100 | From | Alan Cox <> | Subject | Re: [PATCH] vt: avoid BUG_ON in con_shutdown when con_open returns with error |
| |
> I still wonder though if really the BUG_ON is ok, or I still didn't got > that code right. Even if it returns -ERESTARTSYS we will hit that > BUG_ON, if vc->port.tty != tty no? Or that is what the BUG_ON is trying > to catch?
The code is trying to trap a locking error on hangup cases I think. Although the console code currently handles this via its own different locking so is a bit of a mess - it wants moving to the tty kref stuff properly but thats not yet been done.
> While looking I noted a minor thing, in tty_open we don't need to check > retval again in one place, as !retval is always true, because we return > earlier (in retval = tty_add_file ...):
Agreed - that change
Acked-by: Alan Cox <alan@linux.intel.com>
| |