WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Dominic Curran <dominic.curran@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] blktap: fix reference to freed struct request.
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
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:user-agent:date:subject:from:to:message-id :thread-topic:thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=v6+9+QUUXoig2TBKxJ3BudpmecdF+kHQTTODH7o1PNo=; b=SHU5a4DHodOW0ItfsJpTlYgxQqkNAvCjt2cY+oLmFLLSOA4OVul1KE4JqwySiMQb4t kWiXWPi16HxQTfPTwJJvS9z+3M/prR4XGmcNvPMr1mUfV7oyw2YaziPxvdvMto701xYa 7VPxm/ZsfxGc+mWaQ4Q6qDKQMbLNV7Zyy5h1c=
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=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4D7672F7.1040805@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acvdwqty3h4MYZTW5E6LRNAzopC3Cw==
Thread-topic: [Xen-devel] blktap: fix reference to freed struct request.
User-agent: Microsoft-Entourage/12.28.0.101117
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

<Prev in Thread] Current Thread [Next in Thread>