]> git.baikalelectronics.ru Git - kernel.git/commit
staging: sep: call to sep_ioctl() may leave driver in unusable state
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Tue, 30 Aug 2011 21:57:10 +0000 (01:57 +0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 6 Sep 2011 23:49:29 +0000 (16:49 -0700)
commite1b897dec2d639b2a2e01897628410671c9b023e
tree530f344ae8d8f8a784faa32697f34473f406fdb8
parent29b8eb8ed8d7d5da9f7a1fb762625c802aa72b1b
staging: sep: call to sep_ioctl() may leave driver in unusable state

If sep_ioctl() is called from a process that does not own
current transaction, it unlocks unheld sep->ioctl_mutex and
returns -EACCES leaving sep->sep_mutex acquired.

The patch fixes the mutex lock-unlock mismatch.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/sep/sep_driver.c