Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

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>
Tested-by: Mikael Pettersson <mikpe@it.uu.se>
Acked-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ross Lagerwall and committed by
Greg Kroah-Hartman
ef223fb3 7d132055

+1 -4
+1 -4
drivers/tty/vt/vt_ioctl.c
··· 289 289 struct vc_data *vc = NULL; 290 290 int ret = 0; 291 291 292 - if (!vc_num) 293 - return 0; 294 - 295 292 console_lock(); 296 293 if (VT_BUSY(vc_num)) 297 294 ret = -EBUSY; 298 - else 295 + else if (vc_num) 299 296 vc = vc_deallocate(vc_num); 300 297 console_unlock(); 301 298