[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111017165011.GA19724@phenom.dumpdata.com>
Date: Mon, 17 Oct 2011 12:50:11 -0400
From: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To: Jan Beulich <JBeulich@...e.com>
Cc: hch@...radead.org, xen-devel@...ts.xensource.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] xen/blkback: Support 'feature-barrier' aka old-style
BARRIER requests.
On Mon, Oct 17, 2011 at 12:36:18PM +0100, Jan Beulich wrote:
> >>> On 10.10.11 at 17:28, Konrad Rzeszutek Wilk <konrad.wilk@...cle.com> wrote:
> > @@ -481,6 +503,10 @@ static void __end_block_io_op(struct pending_req
> > *pending_req, int error)
> > pending_req->operation, pending_req->status);
> > xen_blkif_put(pending_req->blkif);
> > free_req(pending_req);
> > + if (atomic_read(&pending_req->blkif->refcnt) <= 2) {
> > + if (atomic_read(&pending_req->blkif->drain))
> > + complete(&pending_req->blkif->drain_complete);
> > + }
>
> Shouldn't this be done *before* the call the free_req()? Or
Yes, otherwise we could referencing somebody's else blkif->refcnt.
Thanks for spotting that.
> alternatively a local copy of pending_req->blkif be obtained before
> freeing pending_req (which could be used in a couple more places
> in this function)?
>
> Jan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists