From: Ross Lagerwall <rosslagerwall@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Dave Jones <davej@redhat.com>,
Peter Hurley <peter@hurleysoftware.com>,
linux-serial@vger.kernel.org,
Greg KH <gregkh@linuxfoundation.org>,
Ross Lagerwall <rosslagerwall@gmail.com>
Subject: [PATCH] tty/vt: Return EBUSY if deallocating VT1 and it is busy
Date: Fri, 14 Jun 2013 23:24:25 +0100 [thread overview]
Message-ID: <1371248665-1176-1-git-send-email-rosslagerwall@gmail.com> (raw)
In-Reply-To: <20130614213543.GA1896@kroah.com>
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
next prev parent reply other threads:[~2013-06-14 22:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20130614204740.GA706@hobo.wolfson.cam.ac.uk>
2013-06-14 21:35 ` Possible tty VT1 disallocate regression Greg KH
2013-06-14 22:02 ` Peter Hurley
2013-06-14 22:24 ` Ross Lagerwall [this message]
2013-06-14 23:01 ` [PATCH] tty/vt: Return EBUSY if deallocating VT1 and it is busy Peter Hurley
2013-06-15 4:48 ` Greg KH
2013-06-16 17:35 ` Mikael Pettersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1371248665-1176-1-git-send-email-rosslagerwall@gmail.com \
--to=rosslagerwall@gmail.com \
--cc=davej@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=peter@hurleysoftware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox