linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Possible tty VT1 disallocate regression
@ 2013-06-14 20:47 Ross Lagerwall
  2013-06-14 21:35 ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Ross Lagerwall @ 2013-06-14 20:47 UTC (permalink / raw)
  To: linux-kernel

Hi,

Ever since commit 421b40a6286e ("tty/vt: Fix vc_deallocate() lock
order"), the first VT does not clear when I log out.  AFAIK, this means
that disallocation is not working?  The problem only affects the first
VT, the others clear when logging out.

Regards
-- 
Ross Lagerwall

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Possible tty VT1 disallocate regression
  2013-06-14 20:47 Possible tty VT1 disallocate regression Ross Lagerwall
@ 2013-06-14 21:35 ` Greg KH
  2013-06-14 22:02   ` Peter Hurley
  2013-06-14 22:24   ` [PATCH] tty/vt: Return EBUSY if deallocating VT1 and it is busy Ross Lagerwall
  0 siblings, 2 replies; 7+ messages in thread
From: Greg KH @ 2013-06-14 21:35 UTC (permalink / raw)
  To: Ross Lagerwall; +Cc: linux-kernel, Dave Jones, Peter Hurley, linux-serial

On Fri, Jun 14, 2013 at 09:47:40PM +0100, Ross Lagerwall wrote:
> Hi,
> 
> Ever since commit 421b40a6286e ("tty/vt: Fix vc_deallocate() lock
> order"), the first VT does not clear when I log out.  AFAIK, this means
> that disallocation is not working?  The problem only affects the first
> VT, the others clear when logging out.

And if you revert that patch, does it all start working again?

thanks,

greg k-h

p.s. In the future, please cc: the people who handled the patch you are
asking about, otherwise stuff like this often gets missed in the noise
of lkml.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Possible tty VT1 disallocate regression
  2013-06-14 21:35 ` Greg KH
@ 2013-06-14 22:02   ` Peter Hurley
  2013-06-14 22:24   ` [PATCH] tty/vt: Return EBUSY if deallocating VT1 and it is busy Ross Lagerwall
  1 sibling, 0 replies; 7+ messages in thread
From: Peter Hurley @ 2013-06-14 22:02 UTC (permalink / raw)
  To: Greg KH; +Cc: Ross Lagerwall, linux-kernel, Dave Jones, linux-serial

On 06/14/2013 05:35 PM, Greg KH wrote:
> On Fri, Jun 14, 2013 at 09:47:40PM +0100, Ross Lagerwall wrote:
>> Hi,
>>
>> Ever since commit 421b40a6286e ("tty/vt: Fix vc_deallocate() lock
>> order"), the first VT does not clear when I log out.  AFAIK, this means
>> that disallocation is not working?  The problem only affects the first
>> VT, the others clear when logging out.
>
> And if you revert that patch, does it all start working again?
>
> thanks,
>
> greg k-h
>
> p.s. In the future, please cc: the people who handled the patch you are
> asking about, otherwise stuff like this often gets missed in the noise
> of lkml.

I've already been re-reviewing the VT indexing to see if or what I missed.

Thanks,
Peter Hurley


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] tty/vt: Return EBUSY if deallocating VT1 and it is busy
  2013-06-14 21:35 ` Greg KH
  2013-06-14 22:02   ` Peter Hurley
@ 2013-06-14 22:24   ` Ross Lagerwall
  2013-06-14 23:01     ` Peter Hurley
  2013-06-16 17:35     ` Mikael Pettersson
  1 sibling, 2 replies; 7+ messages in thread
From: Ross Lagerwall @ 2013-06-14 22:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Dave Jones, Peter Hurley, linux-serial, Greg KH, Ross Lagerwall

Commit 421b40a6286e ("tty/vt: Fix vc_deallocate() lock order") changed
the behavior when deallocating VT 1.  Previously if trying to
deallocate VT1 and it is busy, we would return EBUSY.  The commit
changed this to return 0 (success).

This commit restores the old behavior.

Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com>
---
On 06/14/2013 05:35 PM, Greg KH wrote:
> p.s. In the future, please cc: the people who handled the patch you are
> asking about, otherwise stuff like this often gets missed in the noise
> of lkml.

Yes, sorry about that.  I only remembered after I sent the email.

 drivers/tty/vt/vt_ioctl.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c
index fc2c06c..2bd78e2 100644
--- a/drivers/tty/vt/vt_ioctl.c
+++ b/drivers/tty/vt/vt_ioctl.c
@@ -289,13 +289,10 @@ static int vt_disallocate(unsigned int vc_num)
 	struct vc_data *vc = NULL;
 	int ret = 0;
 
-	if (!vc_num)
-		return 0;
-
 	console_lock();
 	if (VT_BUSY(vc_num))
 		ret = -EBUSY;
-	else
+	else if (vc_num)
 		vc = vc_deallocate(vc_num);
 	console_unlock();
 
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] tty/vt: Return EBUSY if deallocating VT1 and it is busy
  2013-06-14 22:24   ` [PATCH] tty/vt: Return EBUSY if deallocating VT1 and it is busy Ross Lagerwall
@ 2013-06-14 23:01     ` Peter Hurley
  2013-06-15  4:48       ` Greg KH
  2013-06-16 17:35     ` Mikael Pettersson
  1 sibling, 1 reply; 7+ messages in thread
From: Peter Hurley @ 2013-06-14 23:01 UTC (permalink / raw)
  To: Ross Lagerwall; +Cc: linux-kernel, Dave Jones, linux-serial, Greg KH

On 06/14/2013 06:24 PM, Ross Lagerwall wrote:
> Commit 421b40a6286e ("tty/vt: Fix vc_deallocate() lock order") changed
> the behavior when deallocating VT 1.  Previously if trying to
> deallocate VT1 and it is busy, we would return EBUSY.  The commit
> changed this to return 0 (success).
>
> This commit restores the old behavior.
>
> Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com>

Thanks.

Acked-by: Peter Hurley <peter@hurleysoftware.com>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] tty/vt: Return EBUSY if deallocating VT1 and it is busy
  2013-06-14 23:01     ` Peter Hurley
@ 2013-06-15  4:48       ` Greg KH
  0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2013-06-15  4:48 UTC (permalink / raw)
  To: Peter Hurley, Ross Lagerwall, linux-kernel, Dave Jones, linux-serial

On Fri, Jun 14, 2013 at 07:01:56PM -0400, Peter Hurley wrote:
> On 06/14/2013 06:24 PM, Ross Lagerwall wrote:
> >Commit 421b40a6286e ("tty/vt: Fix vc_deallocate() lock order") changed
> >the behavior when deallocating VT 1.  Previously if trying to
> >deallocate VT1 and it is busy, we would return EBUSY.  The commit
> >changed this to return 0 (success).
> >
> >This commit restores the old behavior.
> >
> >Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com>
> 
> Thanks.
> 
> Acked-by: Peter Hurley <peter@hurleysoftware.com>

Thanks for this, I'll queue it up for Linus soon.

greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] tty/vt: Return EBUSY if deallocating VT1 and it is busy
  2013-06-14 22:24   ` [PATCH] tty/vt: Return EBUSY if deallocating VT1 and it is busy Ross Lagerwall
  2013-06-14 23:01     ` Peter Hurley
@ 2013-06-16 17:35     ` Mikael Pettersson
  1 sibling, 0 replies; 7+ messages in thread
From: Mikael Pettersson @ 2013-06-16 17:35 UTC (permalink / raw)
  To: Ross Lagerwall
  Cc: linux-kernel, Dave Jones, Peter Hurley, linux-serial, Greg KH

Ross Lagerwall writes:
 > Commit 421b40a6286e ("tty/vt: Fix vc_deallocate() lock order") changed
 > the behavior when deallocating VT 1.  Previously if trying to
 > deallocate VT1 and it is busy, we would return EBUSY.  The commit
 > changed this to return 0 (success).
 > 
 > This commit restores the old behavior.
 > 
 > Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com>

This solves the VT blanking regression I've seen with the 3.10-rc
kernels.

Tested-by: Mikael Pettersson <mikpe@it.uu.se>

 > ---
 > On 06/14/2013 05:35 PM, Greg KH wrote:
 > > p.s. In the future, please cc: the people who handled the patch you are
 > > asking about, otherwise stuff like this often gets missed in the noise
 > > of lkml.
 > 
 > Yes, sorry about that.  I only remembered after I sent the email.
 > 
 >  drivers/tty/vt/vt_ioctl.c | 5 +----
 >  1 file changed, 1 insertion(+), 4 deletions(-)
 > 
 > diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c
 > index fc2c06c..2bd78e2 100644
 > --- a/drivers/tty/vt/vt_ioctl.c
 > +++ b/drivers/tty/vt/vt_ioctl.c
 > @@ -289,13 +289,10 @@ static int vt_disallocate(unsigned int vc_num)
 >  	struct vc_data *vc = NULL;
 >  	int ret = 0;
 >  
 > -	if (!vc_num)
 > -		return 0;
 > -
 >  	console_lock();
 >  	if (VT_BUSY(vc_num))
 >  		ret = -EBUSY;
 > -	else
 > +	else if (vc_num)
 >  		vc = vc_deallocate(vc_num);
 >  	console_unlock();
 >  
 > -- 
 > 1.8.3.1
 > 
 > --
 > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
 > the body of a message to majordomo@vger.kernel.org
 > More majordomo info at  http://vger.kernel.org/majordomo-info.html
 > Please read the FAQ at  http://www.tux.org/lkml/
 > 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-06-16 17:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-14 20:47 Possible tty VT1 disallocate regression Ross Lagerwall
2013-06-14 21:35 ` Greg KH
2013-06-14 22:02   ` Peter Hurley
2013-06-14 22:24   ` [PATCH] tty/vt: Return EBUSY if deallocating VT1 and it is busy Ross Lagerwall
2013-06-14 23:01     ` Peter Hurley
2013-06-15  4:48       ` Greg KH
2013-06-16 17:35     ` Mikael Pettersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).