]> git.baikalelectronics.ru Git - kernel.git/commit
skd: Enable request tags for the block layer queue
authorBart Van Assche <bart.vanassche@wdc.com>
Thu, 17 Aug 2017 20:13:26 +0000 (13:13 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 18 Aug 2017 14:45:29 +0000 (08:45 -0600)
commitec9308a93fd8cfd14df65e39b1f564c24001e6eb
tree5fab9bf17bbd2d62a1a897fbe162be3c086571b6
parent44275c24bd82992b9f36d7ff8732f4ad18ae8cac
skd: Enable request tags for the block layer queue

Use the request tag when allocating a skd_fitmsg_context or
skd_request_context such that the lists used to track free elements
can be eliminated. Swap the skd_end_request() and skd_release_req()
calls to avoid triggering a use-after-free. Remove
skd_fitmsg_context.state and .outstanding because FIT messages are
shared among requests and because updating a FIT message after a
request has finished whould trigger a use-after-free.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/skd_main.c