* [PATCH 0/4 v10] SCSI device removal fixes
@ 2012-06-29 15:30 Bart Van Assche
2012-06-29 15:31 ` [PATCH 1/5] block: Fix blk_execute_rq_nowait() dead queue handling Bart Van Assche
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: Bart Van Assche @ 2012-06-29 15:30 UTC (permalink / raw)
To: linux-scsi, James Bottomley, Jens Axboe, Joe Lawrence,
Jun'ichi Nomura, Mike Christie, Muthukumar Ratty,
Stefan Richter, Tejun Heo
This is version ten of the SCSI device removal patch series. This
patch series has been tested by triggering a large number of removals of
a SCSI device controlled by the ib_srp LLD and at the same time running
an I/O integrity test with fio on a dm device on top of the SRP SCSI device.
Changes compared to v9:
- Added a patch to the series (3/5).
- Updated patch description of patch 2/5, swapped a kfree() and
blk_cleanup_queue() call to make the code easier to read and removed
the BUG_ON(!sdev) statements from that patch.
Changes compared to v8:
- Replaced the block layer patch (1/4) by a more comprehensive patch
from Muthukumar Ratty.
- Added "Reviewed-by: Mike Christie" in patches 2/4..4/4.
Changes compared to v7:
- Made sure that __scsi_queue_insert() processes the request that has
been passed to that function. Added a comment in that function too.
- Fixed a typo in the description of the first patch in this series
and removed "CC: stable".
Changes compared to v6:
- Added a fix for a race in the block layer.
- Moved a BUG_ON(!sdev) statement up since it's a precondition check.
- Changed return type of scsi_queue_insert() from int to void.
- Added a cancel_work_sync(&sdev->requeue_work) call in
__scsi_remove_device().
Changes compared to v5:
- Removed the function scsi_free_queue() and inlined that function
in its callers.
- Added two additional patches.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/5] block: Fix blk_execute_rq_nowait() dead queue handling
2012-06-29 15:30 [PATCH 0/4 v10] SCSI device removal fixes Bart Van Assche
@ 2012-06-29 15:31 ` Bart Van Assche
2012-06-29 15:33 ` [PATCH 2/5] scsi: Fix device removal NULL pointer dereference Bart Van Assche
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Bart Van Assche @ 2012-06-29 15:31 UTC (permalink / raw)
Cc: linux-scsi, James Bottomley, Jens Axboe, Joe Lawrence,
Jun'ichi Nomura, Mike Christie, Muthukumar Ratty,
Stefan Richter, Tejun Heo
From: Muthukumar Ratty <muthur@gmail.com>
If the queue is dead blk_execute_rq_nowait() doesn't invoke the done()
callback function. That will result in blk_execute_rq() being stuck
in wait_for_completion(). Avoid this by initializing rq->end_io to the
done() callback before we check the queue state. Also, make sure the
queue lock is held around the invocation of the done() callback. Found
this through source code review.
Signed-off-by: Muthukumar Ratty <muthur@gmail.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: James Bottomley <JBottomley@parallels.com>
---
block/blk-exec.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/block/blk-exec.c b/block/blk-exec.c
index fb2cbd5..8b6dc5b 100644
--- a/block/blk-exec.c
+++ b/block/blk-exec.c
@@ -43,6 +43,9 @@ static void blk_end_sync_rq(struct request *rq, int error)
* Description:
* Insert a fully prepared request at the back of the I/O scheduler queue
* for execution. Don't wait for completion.
+ *
+ * Note:
+ * This function will invoke @done directly if the queue is dead.
*/
void blk_execute_rq_nowait(struct request_queue *q, struct gendisk *bd_disk,
struct request *rq, int at_head,
@@ -51,18 +54,20 @@ void blk_execute_rq_nowait(struct request_queue *q, struct gendisk *bd_disk,
int where = at_head ? ELEVATOR_INSERT_FRONT : ELEVATOR_INSERT_BACK;
WARN_ON(irqs_disabled());
+
+ rq->rq_disk = bd_disk;
+ rq->end_io = done;
+
spin_lock_irq(q->queue_lock);
if (unlikely(blk_queue_dead(q))) {
- spin_unlock_irq(q->queue_lock);
rq->errors = -ENXIO;
if (rq->end_io)
rq->end_io(rq, rq->errors);
+ spin_unlock_irq(q->queue_lock);
return;
}
- rq->rq_disk = bd_disk;
- rq->end_io = done;
__elv_add_request(q, rq, where);
__blk_run_queue(q);
/* the queue is stopped so it won't be run */
--
1.7.7
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/5] scsi: Fix device removal NULL pointer dereference
2012-06-29 15:30 [PATCH 0/4 v10] SCSI device removal fixes Bart Van Assche
2012-06-29 15:31 ` [PATCH 1/5] block: Fix blk_execute_rq_nowait() dead queue handling Bart Van Assche
@ 2012-06-29 15:33 ` Bart Van Assche
2012-06-29 15:34 ` [PATCH 3/5] scsi: Avoid dangling pointer in scsi_requeue_command() Bart Van Assche
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Bart Van Assche @ 2012-06-29 15:33 UTC (permalink / raw)
Cc: linux-scsi, James Bottomley, Jens Axboe, Joe Lawrence,
Jun'ichi Nomura, Mike Christie, Muthukumar Ratty,
Stefan Richter, Tejun Heo
Use blk_queue_dead() to test whether the queue is dead instead
of !sdev. Since scsi_prep_fn() may be invoked concurrently with
__scsi_remove_device(), keep the queuedata (sdev) pointer in
__scsi_remove_device(). This patch fixes a kernel oops that
can be triggered by USB device removal. See also
http://www.spinics.net/lists/linux-scsi/msg56254.html.
Other changes included in this patch:
- Swap the blk_cleanup_queue() and kfree() calls in
scsi_host_dev_release() to make that code easier to grasp.
- Remove the queue dead check from scsi_run_queue() since the
queue state can change anyway at any point in that function
where the queue lock is not held.
- Remove the queue dead check from the start of scsi_request_fn()
since it is redundant with the scsi_device_online() check.
Reported-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: James Bottomley <JBottomley@parallels.com>
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: <stable@kernel.org>
---
drivers/scsi/hosts.c | 7 ++++---
drivers/scsi/scsi_lib.c | 32 ++++----------------------------
drivers/scsi/scsi_priv.h | 1 -
drivers/scsi/scsi_sysfs.c | 5 +----
4 files changed, 9 insertions(+), 36 deletions(-)
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index a3a056a..b48c24f 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -290,6 +290,7 @@ static void scsi_host_dev_release(struct device *dev)
struct Scsi_Host *shost = dev_to_shost(dev);
struct device *parent = dev->parent;
struct request_queue *q;
+ void *queuedata;
scsi_proc_hostdir_rm(shost->hostt);
@@ -299,9 +300,9 @@ static void scsi_host_dev_release(struct device *dev)
destroy_workqueue(shost->work_q);
q = shost->uspace_req_q;
if (q) {
- kfree(q->queuedata);
- q->queuedata = NULL;
- scsi_free_queue(q);
+ queuedata = q->queuedata;
+ blk_cleanup_queue(q);
+ kfree(queuedata);
}
scsi_destroy_command_freelist(shost);
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 6dfb978..7ebe167 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -406,10 +406,6 @@ static void scsi_run_queue(struct request_queue *q)
LIST_HEAD(starved_list);
unsigned long flags;
- /* if the device is dead, sdev will be NULL, so no queue to run */
- if (!sdev)
- return;
-
shost = sdev->host;
if (scsi_target(sdev)->single_lun)
scsi_single_lun_run(sdev);
@@ -1370,16 +1366,16 @@ static inline int scsi_host_queue_ready(struct request_queue *q,
* may be changed after request stacking drivers call the function,
* regardless of taking lock or not.
*
- * When scsi can't dispatch I/Os anymore and needs to kill I/Os
- * (e.g. !sdev), scsi needs to return 'not busy'.
- * Otherwise, request stacking drivers may hold requests forever.
+ * When scsi can't dispatch I/Os anymore and needs to kill I/Os scsi
+ * needs to return 'not busy'. Otherwise, request stacking drivers
+ * may hold requests forever.
*/
static int scsi_lld_busy(struct request_queue *q)
{
struct scsi_device *sdev = q->queuedata;
struct Scsi_Host *shost;
- if (!sdev)
+ if (blk_queue_dead(q))
return 0;
shost = sdev->host;
@@ -1490,12 +1486,6 @@ static void scsi_request_fn(struct request_queue *q)
struct scsi_cmnd *cmd;
struct request *req;
- if (!sdev) {
- while ((req = blk_peek_request(q)) != NULL)
- scsi_kill_request(req, q);
- return;
- }
-
if(!get_device(&sdev->sdev_gendev))
/* We must be tearing the block queue down already */
return;
@@ -1697,20 +1687,6 @@ struct request_queue *scsi_alloc_queue(struct scsi_device *sdev)
return q;
}
-void scsi_free_queue(struct request_queue *q)
-{
- unsigned long flags;
-
- WARN_ON(q->queuedata);
-
- /* cause scsi_request_fn() to kill all non-finished requests */
- spin_lock_irqsave(q->queue_lock, flags);
- q->request_fn(q);
- spin_unlock_irqrestore(q->queue_lock, flags);
-
- blk_cleanup_queue(q);
-}
-
/*
* Function: scsi_block_requests()
*
diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h
index 07ce3f5..2b8d8b5 100644
--- a/drivers/scsi/scsi_priv.h
+++ b/drivers/scsi/scsi_priv.h
@@ -84,7 +84,6 @@ extern void scsi_next_command(struct scsi_cmnd *cmd);
extern void scsi_io_completion(struct scsi_cmnd *, unsigned int);
extern void scsi_run_host_queues(struct Scsi_Host *shost);
extern struct request_queue *scsi_alloc_queue(struct scsi_device *sdev);
-extern void scsi_free_queue(struct request_queue *q);
extern int scsi_init_queue(void);
extern void scsi_exit_queue(void);
struct request_queue;
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 04c2a27..42c35ff 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -971,11 +971,8 @@ void __scsi_remove_device(struct scsi_device *sdev)
sdev->host->hostt->slave_destroy(sdev);
transport_destroy_device(dev);
- /* cause the request function to reject all I/O requests */
- sdev->request_queue->queuedata = NULL;
-
/* Freeing the queue signals to block that we're done */
- scsi_free_queue(sdev->request_queue);
+ blk_cleanup_queue(sdev->request_queue);
put_device(dev);
}
--
1.7.7
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/5] scsi: Avoid dangling pointer in scsi_requeue_command()
2012-06-29 15:30 [PATCH 0/4 v10] SCSI device removal fixes Bart Van Assche
2012-06-29 15:31 ` [PATCH 1/5] block: Fix blk_execute_rq_nowait() dead queue handling Bart Van Assche
2012-06-29 15:33 ` [PATCH 2/5] scsi: Fix device removal NULL pointer dereference Bart Van Assche
@ 2012-06-29 15:34 ` Bart Van Assche
2012-06-29 16:06 ` Mike Christie
2012-06-29 16:48 ` Tejun Heo
2012-06-29 15:35 ` [PATCH 4/5] scsi: Change return type of scsi_queue_insert() into void Bart Van Assche
2012-06-29 15:36 ` [PATCH 5/5] scsi: Stop accepting SCSI requests before removing a device Bart Van Assche
4 siblings, 2 replies; 8+ messages in thread
From: Bart Van Assche @ 2012-06-29 15:34 UTC (permalink / raw)
Cc: linux-scsi, James Bottomley, Jens Axboe, Joe Lawrence,
Jun'ichi Nomura, Mike Christie, Muthukumar Ratty,
Stefan Richter, Tejun Heo
Reported-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: James Bottomley <JBottomley@parallels.com>
Cc: <stable@kernel.org>
---
drivers/scsi/scsi_lib.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 7ebe167..af6357a 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -479,15 +479,24 @@ void scsi_requeue_run_queue(struct work_struct *work)
*/
static void scsi_requeue_command(struct request_queue *q, struct scsi_cmnd *cmd)
{
+ struct scsi_device *sdev = cmd->device;
struct request *req = cmd->request;
unsigned long flags;
+ /*
+ * We need to hold a reference on the device to avoid that the queue
+ * gets killed after the unlock and before scsi_run_queue is invoked.
+ */
+ get_device(&sdev->sdev_gendev);
+
spin_lock_irqsave(q->queue_lock, flags);
scsi_unprep_request(req);
blk_requeue_request(q, req);
spin_unlock_irqrestore(q->queue_lock, flags);
scsi_run_queue(q);
+
+ put_device(&sdev->sdev_gendev);
}
void scsi_next_command(struct scsi_cmnd *cmd)
--
1.7.7
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/5] scsi: Change return type of scsi_queue_insert() into void
2012-06-29 15:30 [PATCH 0/4 v10] SCSI device removal fixes Bart Van Assche
` (2 preceding siblings ...)
2012-06-29 15:34 ` [PATCH 3/5] scsi: Avoid dangling pointer in scsi_requeue_command() Bart Van Assche
@ 2012-06-29 15:35 ` Bart Van Assche
2012-06-29 15:36 ` [PATCH 5/5] scsi: Stop accepting SCSI requests before removing a device Bart Van Assche
4 siblings, 0 replies; 8+ messages in thread
From: Bart Van Assche @ 2012-06-29 15:35 UTC (permalink / raw)
Cc: linux-scsi, James Bottomley, Jens Axboe, Joe Lawrence,
Jun'ichi Nomura, Mike Christie, Muthukumar Ratty,
Stefan Richter, Tejun Heo
The return value of scsi_queue_insert() is ignored by all its
callers, hence change the return type of this function into
void.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: James Bottomley <JBottomley@parallels.com>
Cc: <stable@kernel.org>
---
drivers/scsi/scsi_lib.c | 8 +++-----
drivers/scsi/scsi_priv.h | 2 +-
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index af6357a..fac475b 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -109,7 +109,7 @@ static void scsi_unprep_request(struct request *req)
* for a requeue after completion, which should only occur in this
* file.
*/
-static int __scsi_queue_insert(struct scsi_cmnd *cmd, int reason, int unbusy)
+static void __scsi_queue_insert(struct scsi_cmnd *cmd, int reason, int unbusy)
{
struct Scsi_Host *host = cmd->device->host;
struct scsi_device *device = cmd->device;
@@ -162,8 +162,6 @@ static int __scsi_queue_insert(struct scsi_cmnd *cmd, int reason, int unbusy)
spin_unlock_irqrestore(q->queue_lock, flags);
kblockd_schedule_work(q, &device->requeue_work);
-
- return 0;
}
/*
@@ -185,9 +183,9 @@ static int __scsi_queue_insert(struct scsi_cmnd *cmd, int reason, int unbusy)
* Notes: This could be called either from an interrupt context or a
* normal process context.
*/
-int scsi_queue_insert(struct scsi_cmnd *cmd, int reason)
+void scsi_queue_insert(struct scsi_cmnd *cmd, int reason)
{
- return __scsi_queue_insert(cmd, reason, 1);
+ __scsi_queue_insert(cmd, reason, 1);
}
/**
* scsi_execute - insert request and wait for the result
diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h
index 2b8d8b5..cacb0e7 100644
--- a/drivers/scsi/scsi_priv.h
+++ b/drivers/scsi/scsi_priv.h
@@ -79,7 +79,7 @@ int scsi_noretry_cmd(struct scsi_cmnd *scmd);
/* scsi_lib.c */
extern int scsi_maybe_unblock_host(struct scsi_device *sdev);
extern void scsi_device_unbusy(struct scsi_device *sdev);
-extern int scsi_queue_insert(struct scsi_cmnd *cmd, int reason);
+extern void scsi_queue_insert(struct scsi_cmnd *cmd, int reason);
extern void scsi_next_command(struct scsi_cmnd *cmd);
extern void scsi_io_completion(struct scsi_cmnd *, unsigned int);
extern void scsi_run_host_queues(struct Scsi_Host *shost);
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/5] scsi: Stop accepting SCSI requests before removing a device
2012-06-29 15:30 [PATCH 0/4 v10] SCSI device removal fixes Bart Van Assche
` (3 preceding siblings ...)
2012-06-29 15:35 ` [PATCH 4/5] scsi: Change return type of scsi_queue_insert() into void Bart Van Assche
@ 2012-06-29 15:36 ` Bart Van Assche
4 siblings, 0 replies; 8+ messages in thread
From: Bart Van Assche @ 2012-06-29 15:36 UTC (permalink / raw)
Cc: linux-scsi, James Bottomley, Jens Axboe, Joe Lawrence,
Jun'ichi Nomura, Mike Christie, Muthukumar Ratty,
Stefan Richter, Tejun Heo
Avoid that the code for requeueing SCSI requests triggers a
crash by making sure that that code isn't scheduled anymore
after a device has been removed.
Also, source code inspection of __scsi_remove_device() revealed
a race condition in this function: no new SCSI requests must be
accepted for a SCSI device after device removal started.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: James Bottomley <JBottomley@parallels.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Joe Lawrence <jdl1291@gmail.com>
Cc: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Cc: <stable@kernel.org>
---
drivers/scsi/scsi_lib.c | 7 ++++---
drivers/scsi/scsi_sysfs.c | 11 +++++++++--
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index fac475b..13c7455 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -155,13 +155,14 @@ static void __scsi_queue_insert(struct scsi_cmnd *cmd, int reason, int unbusy)
/*
* Requeue this command. It will go before all other commands
- * that are already in the queue.
+ * that are already in the queue. Schedule requeue work under
+ * lock such that the kblockd_schedule_work() call happens
+ * before blk_cleanup_queue() finishes.
*/
spin_lock_irqsave(q->queue_lock, flags);
blk_requeue_request(q, cmd->request);
- spin_unlock_irqrestore(q->queue_lock, flags);
-
kblockd_schedule_work(q, &device->requeue_work);
+ spin_unlock_irqrestore(q->queue_lock, flags);
}
/*
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 42c35ff..efffc92 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -966,13 +966,20 @@ void __scsi_remove_device(struct scsi_device *sdev)
device_del(dev);
} else
put_device(&sdev->sdev_dev);
+
+ /*
+ * Stop accepting new requests and wait until all queuecommand() and
+ * scsi_run_queue() invocations have finished before tearing down the
+ * device.
+ */
scsi_device_set_state(sdev, SDEV_DEL);
+ blk_cleanup_queue(sdev->request_queue);
+ cancel_work_sync(&sdev->requeue_work);
+
if (sdev->host->hostt->slave_destroy)
sdev->host->hostt->slave_destroy(sdev);
transport_destroy_device(dev);
- /* Freeing the queue signals to block that we're done */
- blk_cleanup_queue(sdev->request_queue);
put_device(dev);
}
--
1.7.7
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 3/5] scsi: Avoid dangling pointer in scsi_requeue_command()
2012-06-29 15:34 ` [PATCH 3/5] scsi: Avoid dangling pointer in scsi_requeue_command() Bart Van Assche
@ 2012-06-29 16:06 ` Mike Christie
2012-06-29 16:48 ` Tejun Heo
1 sibling, 0 replies; 8+ messages in thread
From: Mike Christie @ 2012-06-29 16:06 UTC (permalink / raw)
To: Bart Van Assche
Cc: linux-scsi, James Bottomley, Jens Axboe, Joe Lawrence,
Jun'ichi Nomura, Muthukumar Ratty, Stefan Richter, Tejun Heo
On 06/29/2012 10:34 AM, Bart Van Assche wrote:
> Reported-by: Mike Christie <michaelc@cs.wisc.edu>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> Cc: Tejun Heo <tj@kernel.org>
> Cc: James Bottomley <JBottomley@parallels.com>
> Cc: <stable@kernel.org>
> ---
> drivers/scsi/scsi_lib.c | 9 +++++++++
> 1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> index 7ebe167..af6357a 100644
> --- a/drivers/scsi/scsi_lib.c
> +++ b/drivers/scsi/scsi_lib.c
> @@ -479,15 +479,24 @@ void scsi_requeue_run_queue(struct work_struct *work)
> */
> static void scsi_requeue_command(struct request_queue *q, struct scsi_cmnd *cmd)
> {
> + struct scsi_device *sdev = cmd->device;
> struct request *req = cmd->request;
> unsigned long flags;
>
> + /*
> + * We need to hold a reference on the device to avoid that the queue
> + * gets killed after the unlock and before scsi_run_queue is invoked.
> + */
> + get_device(&sdev->sdev_gendev);
> +
> spin_lock_irqsave(q->queue_lock, flags);
> scsi_unprep_request(req);
> blk_requeue_request(q, req);
> spin_unlock_irqrestore(q->queue_lock, flags);
>
> scsi_run_queue(q);
> +
> + put_device(&sdev->sdev_gendev);
> }
>
> void scsi_next_command(struct scsi_cmnd *cmd)
>
Looks ok to me
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/5] scsi: Avoid dangling pointer in scsi_requeue_command()
2012-06-29 15:34 ` [PATCH 3/5] scsi: Avoid dangling pointer in scsi_requeue_command() Bart Van Assche
2012-06-29 16:06 ` Mike Christie
@ 2012-06-29 16:48 ` Tejun Heo
1 sibling, 0 replies; 8+ messages in thread
From: Tejun Heo @ 2012-06-29 16:48 UTC (permalink / raw)
To: Bart Van Assche
Cc: linux-scsi, James Bottomley, Jens Axboe, Joe Lawrence,
Jun'ichi Nomura, Mike Christie, Muthukumar Ratty,
Stefan Richter
On Fri, Jun 29, 2012 at 03:34:26PM +0000, Bart Van Assche wrote:
> Reported-by: Mike Christie <michaelc@cs.wisc.edu>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> Cc: Tejun Heo <tj@kernel.org>
> Cc: James Bottomley <JBottomley@parallels.com>
> Cc: <stable@kernel.org>
Acked-by: Tejun Heo <tj@kernel.org>
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-06-29 16:48 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-29 15:30 [PATCH 0/4 v10] SCSI device removal fixes Bart Van Assche
2012-06-29 15:31 ` [PATCH 1/5] block: Fix blk_execute_rq_nowait() dead queue handling Bart Van Assche
2012-06-29 15:33 ` [PATCH 2/5] scsi: Fix device removal NULL pointer dereference Bart Van Assche
2012-06-29 15:34 ` [PATCH 3/5] scsi: Avoid dangling pointer in scsi_requeue_command() Bart Van Assche
2012-06-29 16:06 ` Mike Christie
2012-06-29 16:48 ` Tejun Heo
2012-06-29 15:35 ` [PATCH 4/5] scsi: Change return type of scsi_queue_insert() into void Bart Van Assche
2012-06-29 15:36 ` [PATCH 5/5] scsi: Stop accepting SCSI requests before removing a device Bart Van Assche
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).