[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110331155222.061f9c9f@lxorguk.ukuu.org.uk>
Date: Thu, 31 Mar 2011 15:52:22 +0100
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: Herton Ronaldo Krzesinski <herton.krzesinski@...onical.com>
Cc: Alan Cox <alan@...ux.intel.com>, linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...e.de>
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@...ux.intel.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists