aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/storage/Kconfig
diff options
context:
space:
mode:
authorDouglas Gilbert2014-06-25 14:08:03 +0200
committerChristoph Hellwig2014-07-17 22:07:34 +0200
commitcc833acbee9db5ca8c6162b015b4c93863c6f821 (patch)
tree31bdb4b633e51731fcb35383f8e3bee59765378d /drivers/usb/storage/Kconfig
parent16070cc189c5e343696c29c8cff779e692cfcb8d (diff)
sg: O_EXCL and other lock handling
This addresses a problem reported by Vaughan Cao concerning the correctness of the O_EXCL logic in the sg driver. POSIX doesn't defined O_EXCL semantics on devices but "allow only one open file descriptor at a time per sg device" is a rough definition. The sg driver's semantics have been to wait on an open() when O_NONBLOCK is not given and there are O_EXCL headwinds. Nasty things can happen during that wait such as the device being detached (removed). So multiple locks are reworked in this patch making it large and hard to break down into digestible bits. This patch is against Linus's current git repository which doesn't include any sg patches sent in the last few weeks. Hence this patch touches as little as possible that it doesn't need to and strips out most SCSI_LOG_TIMEOUT() changes in v3 because Hannes said he was going to rework all that stuff. The sg3_utils package has several test programs written to test this patch. See examples/sg_tst_excl*.cpp . Not all the locks and flags in sg have been re-worked in this patch, notably sg_request::done . That can wait for a follow-up patch if this one meets with approval. Signed-off-by: Douglas Gilbert <dgilbert@interlog.com> Reviewed-by: Hannes Reinecke <hare@suse.de>
Diffstat (limited to 'drivers/usb/storage/Kconfig')
0 files changed, 0 insertions, 0 deletions