Skip to contentSkip to conversation

Possible tty VT1 disallocate regression

PATCH In review Ross Lagerwall 4 participants 7 messages Jun 14, 2013 – Jun 16, 2013 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

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

Signature · 1 line
Ross Lagerwall
maintainer
#1 lore raw
Quoted 6 lines · Ross Lagerwall

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.

#2 lore raw
Quoted 10 lines · Greg KH
Quoted 6 lines · Ross Lagerwall

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?

Quoted 7 lines

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

#3 lore raw

PATCH 1/1 tty/vt: Return EBUSY if deallocating VT1 and it is busy

In reply to Greg KH

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.

---

Quoted 3 lines · Greg KH

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(-)
drivers/tty/vt/vt_ioctl.c +1 -4
index fc2c06c..2bd78e2 100644
@@ -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();
 
Signature · 1 line
1.8.3.1
Acked-by on v1 1/1
#4 lore raw

Re: [PATCH] tty/vt: Return EBUSY if deallocating VT1 and it is busy

Quoted 8 lines · 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.

Thanks.

maintainer
#5 lore raw

Re: [PATCH] tty/vt: Return EBUSY if deallocating VT1 and it is busy

Quoted 6 lines · Peter Hurley
Quoted 5 lines · 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).

Quoted 7 lines
Quoted 3 lines

This commit restores the old behavior.

Thanks.

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

greg k-h

Tested-by on v1 1/1
#6 lore raw

Re: [PATCH] tty/vt: Return EBUSY if deallocating VT1 and it is busy

In reply to Ross Lagerwall
Quoted 8 lines · 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.

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

Quoted 39 lines

---

Quoted 3 lines · Greg KH

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(-)
drivers/tty/vt/vt_ioctl.c +1 -4
index fc2c06c..2bd78e2 100644
@@ -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();
 
Signature · 7 lines
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/