xfs
[Top] [All Lists]

Re: [PATCH] Do not access buffers after dropping reference count

To: Lachlan McIlroy <lachlan@xxxxxxx>
Subject: Re: [PATCH] Do not access buffers after dropping reference count
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 22 Jul 2008 12:24:04 +1000
Cc: xfs-dev <xfs-dev@xxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <4885430D.7000506@xxxxxxx>
Mail-followup-to: Lachlan McIlroy <lachlan@xxxxxxx>, xfs-dev <xfs-dev@xxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
References: <4885430D.7000506@xxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
On Tue, Jul 22, 2008 at 12:16:45PM +1000, Lachlan McIlroy wrote:
> We should not access a buffer after dropping it's reference count otherwise
> we could race with another thread that releases the final reference count
> and frees the buffer causing us to access potentially unmapped memory.

Looks OK. The commit message should point out this is a problem
only for DEBUG kernels, though.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx


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