blktap: fix reference to freed struct request.
blktap: fix reference to freed struct request.
The request will be freed by the call to __blktap_end_rq(), so to rq->q is invalid before spin_unlock_irq().
drivers/xen/blktap2/device.c Tue Mar 08 10:04:28 2011 -0800 renamed from drivers/xen/blktap2/device.c Tue Mar 08 10:02:58 2011 -0800 +0 -0
@@ -135,9 +135,11 @@
static inline voidblktap_end_rq(struct request *rq, int err)
{
- spin_lock_irq(rq->q->queue_lock);
+ struct request_queue *q = rq->q;
+
+ spin_lock_irq(q->queue_lock);
__blktap_end_rq(rq, err);- spin_unlock_irq(rq->q->queue_lock);
+ spin_unlock_irq(q->queue_lock);
}
void
Quoted 6 lines · Dominic Curran
blktap: fix reference to freed struct request.
The request will be freed by the call to
__blktap_end_rq(), so torq->qis invalid beforespin_unlock_irq().Signed-off-by Dominic Curran <dominic.curran@
... citrix.com>
My fault, I wasn't sure about the uk mx names anymore.
Sorry,
Daniel
Quoted 24 lines
Acked-by Daniel Stodden <[email protected]>diff -r
d971c4c2e309drivers/xen/blktap2/device.cdrivers/xen/blktap2/device.c Tue Mar 08 10:04:28 2011 -0800 renamed from drivers/xen/blktap2/device.c Tue Mar 08 10:02:58 2011 -0800 +4
-2@@ -135,9 +135,11 @@ static inline void blktap_end_rq(struct request *rq, int err) { - spin_lock_irq(rq->q->queue_lock); + struct request_queue *q = rq->q; + + spin_lock_irq(q->queue_lock); __blktap_end_rq(rq, err); - spin_unlock_irq(rq->q->queue_lock); + spin_unlock_irq(q->queue_lock); } void_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 4 lines · Dominic Curran
blktap: fix reference to freed struct request.
The request will be freed by the call to
__blktap_end_rq(), so torq->qis invalid beforespin_unlock_irq().
What tree is this for? Otherwise this could get dropped on the floor. If it's for 2.6.18, the only tree that I'm still responsible for, then it needs 2.6.18 mentioned in the subject line.
-- Keir
Quoted 25 lines
Signed-off-by Dominic Curran <dominic.curran@Acked-by Daniel Stodden <[email protected]>diff -r
d971c4c2e309drivers/xen/blktap2/device.cdrivers/xen/blktap2/device.c Tue Mar 08 10:04:28 2011 -0800 renamed from drivers/xen/blktap2/device.c Tue Mar 08 10:02:58 2011 -0800 +4
-2@@ -135,9 +135,11 @@ static inline void blktap_end_rq(struct request *rq, int err) { - spin_lock_irq(rq->q->queue_lock); + struct request_queue *q = rq->q; + + spin_lock_irq(q->queue_lock); __blktap_end_rq(rq, err); - spin_unlock_irq(rq->q->queue_lock); + spin_unlock_irq(q->queue_lock); } void_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 10 lines · Keir Fraser
Quoted 4 lines · Dominic Curran
blktap: fix reference to freed struct request.
The request will be freed by the call to
__blktap_end_rq(), so torq->qis invalid beforespin_unlock_irq().What tree is this for? Otherwise this could get dropped on the floor. If it's for 2.6.18, the only tree that I'm still responsible for, then it needs 2.6.18 mentioned in the subject line.
This should go into the pvops tree (but will need some path fixup) and ideally goes into stable branch(es?) straight away. 2.6.18 won't have that particular bug, unless that code was patched in.
Daniel
Quoted 34 lines
-- Keir
Quoted 21 lines
Signed-off-by Dominic Curran <dominic.curran@Acked-by Daniel Stodden <[email protected]>diff -r
d971c4c2e309drivers/xen/blktap2/device.cdrivers/xen/blktap2/device.c Tue Mar 08 10:04:28 2011 -0800 renamed from drivers/xen/blktap2/device.c Tue Mar 08 10:02:58 2011 -0800 +4
-2@@ -135,9 +135,11 @@ static inline void blktap_end_rq(struct request *rq, int err) { - spin_lock_irq(rq->q->queue_lock); + struct request_queue *q = rq->q; + + spin_lock_irq(q->queue_lock); __blktap_end_rq(rq, err); - spin_unlock_irq(rq->q->queue_lock); + spin_unlock_irq(q->queue_lock); } voidQuoted 4 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel