From: Oliver Neukum Date: Tue, 16 Dec 2008 09:55:15 +0000 (+0100) Subject: HID: hiddev cleanup -- handle all error conditions properly X-Git-Tag: v2.6.29-rc1~498^2~5 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=079034073faf974973baa0256b029451f6e768ad;p=pandora-kernel.git HID: hiddev cleanup -- handle all error conditions properly This is a cleanup of hiddev and fixes the following issues: - thread safety by locking in read & ioctl, introducing a per device mutex - race between ioctl and disconnect, introducing a flag and locking in form of a per low level device mutex - race between open and other methods, making sure only successfully opened devices are put on the list, changing order of events - range checking both upper and lower limits of the minor range - make sure further calls to open fail for unplugged devices even if the device still has opened files - error checking for low level open - possible loss of wakeup events, using standard waiting macros - race in initialisation by moving registration after full initialisation Signed-off-by: Oliver Neukum Signed-off-by: Jiri Kosina --- Reading git-diff-tree failed