[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] blktap: fix reference to freed struct request.


  • To: Dominic Curran <dominic.curran@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Keir Fraser <keir.xen@xxxxxxxxx>
  • Date: Tue, 08 Mar 2011 18:57:28 +0000
  • Cc:
  • Delivery-date: Tue, 08 Mar 2011 11:00:56 -0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=user-agent:date:subject:from:to:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=gZ/IyiEsVFwnZQM2YLVwb9sHbOnFuIjEVD67j/C3s8V9mp+ILgOFAR2vhqN1snQEdg bAE3CmrBsFGNnNyUOYsI87BHfP+iugCBzTO9Fek2uaZWyrK/uRSnXmBkJa+Vg3tbXdBR U363j/3+61R0lK3il+Qe7XbM/Us9WYuzej9Rk=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: Acvdwqty3h4MYZTW5E6LRNAzopC3Cw==
  • Thread-topic: [Xen-devel] blktap: fix reference to freed struct request.

On 08/03/2011 18:18, "Dominic Curran" <dominic.curran@xxxxxxxxxx> 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@xxxxxxxxxx>
> 
> 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@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.