USB: appledisplay: fix race between reading and writing from the device
authorOliver Neukum <oneukum@suse.de>
Mon, 19 May 2014 11:53:55 +0000 (13:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 May 2014 23:03:57 +0000 (16:03 -0700)
The workqueue handler may call appledisplay_bl_get_brightness() while
user space calls appledisplay_bl_update_status(). As they share a
buffer that must not happen. Use a mutex for mutual exclusion.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/appledisplay.c

Simple merge