Re: [PATCH] vt: avoid BUG_ON in con_shutdown when con_open returnswith error
From: Alan Cox
Date: Thu Mar 31 2011 - 10:51:55 EST
> 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@xxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/