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>
Subject: Re: [Xen-devel] blktap: fix reference to freed struct request.
From: Daniel Stodden <daniel.stodden@xxxxxxxxxx>
Date: Tue, 8 Mar 2011 10:44:08 -0800
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 08 Mar 2011 10:49:31 -0800
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>
References: <4D7672F7.1040805@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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@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>