summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/vga
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-01-04 16:25:34 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2016-01-04 16:25:34 +0100
commit7e935c7ca1e6c398f11edac5beabfc4348e3b3a4 (patch)
tree86da864ba6341bd86b5f5450c611f918722237b2 /drivers/gpu/vga
parent[mips] switch pvc_proc_cleanup() to remove_proc_subtree() (diff)
parentnew helper: memdup_user_nul() (diff)
downloadlinux-7e935c7ca1e6c398f11edac5beabfc4348e3b3a4.tar.xz
linux-7e935c7ca1e6c398f11edac5beabfc4348e3b3a4.zip
Merge branch 'memdup_user_nul' into work.misc
Diffstat (limited to 'drivers/gpu/vga')
-rw-r--r--drivers/gpu/vga/vgaarb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c
index de083aade105..f17cb0431833 100644
--- a/drivers/gpu/vga/vgaarb.c
+++ b/drivers/gpu/vga/vgaarb.c
@@ -395,8 +395,10 @@ int vga_get(struct pci_dev *pdev, unsigned int rsrc, int interruptible)
set_current_state(interruptible ?
TASK_INTERRUPTIBLE :
TASK_UNINTERRUPTIBLE);
- if (signal_pending(current)) {
- rc = -EINTR;
+ if (interruptible && signal_pending(current)) {
+ __set_current_state(TASK_RUNNING);
+ remove_wait_queue(&vga_wait_queue, &wait);
+ rc = -ERESTARTSYS;
break;
}
schedule();