lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140814142348.161b2eca@notabene.brown>
Date:	Thu, 14 Aug 2014 14:23:48 +1000
From:	NeilBrown <neilb@...e.de>
To:	Milosz Tanski <milosz@...in.com>
Cc:	linux-cachefs@...hat.com, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org, David Howells <dhowells@...hat.com>
Subject: Re: [PATCH 2/3] FS-Cache: Reduce cookie ref count if submit fails.

On Wed, 13 Aug 2014 12:58:21 -0400 Milosz Tanski <milosz@...in.com> wrote:

> I've been seeing issues with disposing cookies under vma pressure. The symptom
> is that the refcount gets out of sync. In this case we fail to decrement the
> refcount if submit fails. I found this while auditing the error in and around
> cookie operations.
> 
> Signed-off-by: Milosz Tanski <milosz@...in.com>
> ---
>  fs/fscache/object.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/fscache/object.c b/fs/fscache/object.c
> index d3b4539..e1eb1f5 100644
> --- a/fs/fscache/object.c
> +++ b/fs/fscache/object.c
> @@ -982,6 +982,8 @@ nomem:
>  submit_op_failed:
>  	clear_bit(FSCACHE_OBJECT_IS_LIVE, &object->flags);
>  	spin_unlock(&cookie->lock);
> +	if (__fscache_unuse_cookie(cookie))
> +		__fscache_wake_unused_cookie(cookie);
>  	kfree(op);
>  	_leave(" [EIO]");
>  	return transit_to(KILL_OBJECT);

Should this simple by
  +     fscache_unuse_cookie(cookie);

it does both the "unuse" and the "wake".

Otherwise they all look good to me.

NeilBrown

Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)

Powered by blists - more mailing lists