$EXTINDEX_DIR/description missing
 help / color / mirror / Atom feed
* blktap: fix reference to freed struct request.
@ 2011-03-08 18:18 Dominic Curran
  2011-03-08 18:44 ` Daniel Stodden
  2011-03-08 18:57 ` Keir Fraser
  0 siblings, 2 replies; 4+ messages in thread
From: Dominic Curran @ 2011-03-08 18:18 UTC (permalink / raw)
  To: xen-devel

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().

Signed-off-by: Dominic Curran <dominic.curran@
Acked-by: Daniel Stodden <daniel.stodden@citrix.com>

diff -r d971c4c2e309 drivers/xen/blktap2/device.c
--- a/drivers/xen/blktap2/device.c    Tue Mar 08 10:02:58 2011 -0800
+++ b/drivers/xen/blktap2/device.c    Tue Mar 08 10:04:28 2011 -0800
@@ -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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: blktap: fix reference to freed struct request.
  2011-03-08 18:18 blktap: fix reference to freed struct request Dominic Curran
@ 2011-03-08 18:44 ` Daniel Stodden
  2011-03-08 18:57 ` Keir Fraser
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel Stodden @ 2011-03-08 18:44 UTC (permalink / raw)
  To: Dominic Curran; +Cc: xen-devel@lists.xensource.com

On Tue, 2011-03-08 at 13:18 -0500, Dominic Curran wrote:
> 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().
> 
> Signed-off-by: Dominic Curran <dominic.curran@

... citrix.com>

My fault, I wasn't sure about the uk mx names anymore.

Sorry,
Daniel

> Acked-by: Daniel Stodden <daniel.stodden@citrix.com>
> 
> diff -r d971c4c2e309 drivers/xen/blktap2/device.c
> --- a/drivers/xen/blktap2/device.c    Tue Mar 08 10:02:58 2011 -0800
> +++ b/drivers/xen/blktap2/device.c    Tue Mar 08 10:04:28 2011 -0800
> @@ -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
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: blktap: fix reference to freed struct request.
  2011-03-08 18:18 blktap: fix reference to freed struct request Dominic Curran
  2011-03-08 18:44 ` Daniel Stodden
@ 2011-03-08 18:57 ` Keir Fraser
  2011-03-08 19:09   ` Daniel Stodden
  1 sibling, 1 reply; 4+ messages in thread
From: Keir Fraser @ 2011-03-08 18:57 UTC (permalink / raw)
  To: Dominic Curran, xen-devel

On 08/03/2011 18:18, "Dominic Curran" <dominic.curran@citrix.com> wrote:

> 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().

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

> Signed-off-by: Dominic Curran <dominic.curran@
> Acked-by: Daniel Stodden <daniel.stodden@citrix.com>
> 
> diff -r d971c4c2e309 drivers/xen/blktap2/device.c
> --- a/drivers/xen/blktap2/device.c    Tue Mar 08 10:02:58 2011 -0800
> +++ b/drivers/xen/blktap2/device.c    Tue Mar 08 10:04:28 2011 -0800
> @@ -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
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: blktap: fix reference to freed struct request.
  2011-03-08 18:57 ` Keir Fraser
@ 2011-03-08 19:09   ` Daniel Stodden
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Stodden @ 2011-03-08 19:09 UTC (permalink / raw)
  To: Keir Fraser; +Cc: Fitzhardinge, xen-devel@lists.xensource.com, Jeremy

On Tue, 2011-03-08 at 13:57 -0500, Keir Fraser wrote:
> On 08/03/2011 18:18, "Dominic Curran" <dominic.curran@citrix.com> wrote:
> 
> > 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().
> 
> 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

>  -- Keir
> 
> > Signed-off-by: Dominic Curran <dominic.curran@
> > Acked-by: Daniel Stodden <daniel.stodden@citrix.com>
> > 
> > diff -r d971c4c2e309 drivers/xen/blktap2/device.c
> > --- a/drivers/xen/blktap2/device.c    Tue Mar 08 10:02:58 2011 -0800
> > +++ b/drivers/xen/blktap2/device.c    Tue Mar 08 10:04:28 2011 -0800
> > @@ -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
> > Xen-devel@lists.xensource.com
> > http://lists.xensource.com/xen-devel
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-03-08 19:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-08 18:18 blktap: fix reference to freed struct request Dominic Curran
2011-03-08 18:44 ` Daniel Stodden
2011-03-08 18:57 ` Keir Fraser
2011-03-08 19:09   ` Daniel Stodden

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.