summaryrefslogtreecommitdiff
path: root/include/linux/mmc
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2011-06-24 12:55:10 (GMT)
committerChris Ball <cjb@laptop.org>2011-07-20 21:20:58 (GMT)
commit7456caae37396fc1bc6f8e9461d07664b8c2f280 (patch)
tree972f231756e8e766aa367689085a2834c7f6fcb4 /include/linux/mmc
parentb40af3aa7712e8f1b73e00e781cd93181483f649 (diff)
downloadlinux-fsl-qoriq-7456caae37396fc1bc6f8e9461d07664b8c2f280.tar.xz
mmc: dw_mmc: fix race with request and removal
When a request is made, the card presence is checked and the request is queued. These two parts must be atomic with respect to card removal, or a card removal could be handled in between, and the new request wouldn't get cancelled until another card was inserted. Therefore move the spinlock protection from dw_mci_queue_request() up into dw_mci_request() to cover the presence check. Note that the test_bit() used for the presence check isn't atomic itself, so should have been protected by a spinlock anyway. Signed-off-by: James Hogan <james.hogan@imgtec.com> Acked-by: Will Newton <will.newton@imgtec.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'include/linux/mmc')
0 files changed, 0 insertions, 0 deletions