vgaarb: fix signal handling in vga_get()
authorKirill A. Shutemov <kirill@shutemov.name>
Mon, 30 Nov 2015 02:17:31 +0000 (04:17 +0200)
committerDave Airlie <airlied@redhat.com>
Fri, 11 Dec 2015 04:04:44 +0000 (14:04 +1000)
commit9f5bd30818c42c6c36a51f93b4df75a2ea2bd85e
tree99f265dbc7b9ee58dfa5c0a9e2161e2d787a794d
parent49307da31be5708bb0b9926efb35dd74d946ab0c
vgaarb: fix signal handling in vga_get()

There are few defects in vga_get() related to signal hadning:

  - we shouldn't check for pending signals for TASK_UNINTERRUPTIBLE
    case;

  - if we found pending signal we must remove ourself from wait queue
    and change task state back to running;

  - -ERESTARTSYS is more appropriate, I guess.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: stable@vger.kernel.org
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/vga/vgaarb.c