mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-19 11:04:00 +08:00
NVMe: Need to lock queue during interrupt handling
If we're sharing a queue between multiple CPUs and we cancel a sync I/O, we must have the queue locked to avoid corrupting the stack of the thread that submitted the I/O. It turns out this is the same locking that's needed for the threaded irq handler, so share that code. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
This commit is contained in:
parent
48e3d39816
commit
ec6ce618d6
@ -476,11 +476,6 @@ static irqreturn_t nvme_process_cq(struct nvme_queue *nvmeq)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static irqreturn_t nvme_irq(int irq, void *data)
|
static irqreturn_t nvme_irq(int irq, void *data)
|
||||||
{
|
|
||||||
return nvme_process_cq(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
static irqreturn_t nvme_irq_thread(int irq, void *data)
|
|
||||||
{
|
{
|
||||||
irqreturn_t result;
|
irqreturn_t result;
|
||||||
struct nvme_queue *nvmeq = data;
|
struct nvme_queue *nvmeq = data;
|
||||||
@ -676,7 +671,7 @@ static int queue_request_irq(struct nvme_dev *dev, struct nvme_queue *nvmeq,
|
|||||||
{
|
{
|
||||||
if (use_threaded_interrupts)
|
if (use_threaded_interrupts)
|
||||||
return request_threaded_irq(dev->entry[nvmeq->cq_vector].vector,
|
return request_threaded_irq(dev->entry[nvmeq->cq_vector].vector,
|
||||||
nvme_irq_check, nvme_irq_thread,
|
nvme_irq_check, nvme_irq,
|
||||||
IRQF_DISABLED | IRQF_SHARED,
|
IRQF_DISABLED | IRQF_SHARED,
|
||||||
name, nvmeq);
|
name, nvmeq);
|
||||||
return request_irq(dev->entry[nvmeq->cq_vector].vector, nvme_irq,
|
return request_irq(dev->entry[nvmeq->cq_vector].vector, nvme_irq,
|
||||||
|
Loading…
Reference in New Issue
Block a user