From: Ian Abbott Date: Fri, 8 Nov 2013 15:03:25 +0000 (+0000) Subject: staging: comedi: use attach_lock semaphore during attach and detach X-Git-Tag: v3.14-rc1~150^2~775^2~100 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf11c134246e8f3cfa2582a3d2af84ed7dfd59b6;p=pandora-kernel.git staging: comedi: use attach_lock semaphore during attach and detach Acquire the `attach_lock` semaphore in the `struct comedi_device` while modifying the `attached` flag. This is a "write" acquire. Note that the main mutex in the `struct comedi_device` is also held at this time. Tasks wishing to check the device is attached will need to either acquire the main mutex, or "read" acquire the `attach_lock` semaphore, or both in that order. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed