summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2015-12-08 09:00:31 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-03 15:06:50 -0800
commit55ee25f6bfdc18393d4ea5d3bcc56bc57e56a8a7 (patch)
treefb2318665cb6852d580d5629aafc648ad84b13e8 /include/linux
parentb25bfd9272838d020da06df12bd0d21c0302a9f9 (diff)
downloadlwn-55ee25f6bfdc18393d4ea5d3bcc56bc57e56a8a7.tar.gz
lwn-55ee25f6bfdc18393d4ea5d3bcc56bc57e56a8a7.zip
ses: Fix problems with simple enclosures
commit 3417c1b5cb1fdc10261dbed42b05cc93166a78fd upstream. Simple enclosure implementations (mostly USB) are allowed to return only page 8 to every diagnostic query. That really confuses our implementation because we assume the return is the page we asked for and end up doing incorrect offsets based on bogus information leading to accesses outside of allocated ranges. Fix that by checking the page code of the return and giving an error if it isn't the one we asked for. This should fix reported bugs with USB storage by simply refusing to attach to enclosures that behave like this. It's also good defensive practise now that we're starting to see more USB enclosures. Reported-by: Andrea Gelmini <andrea.gelmini@gelma.net> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions