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>] [day] [month] [year] [list]
Message-Id: <F3B5F5DD-8EF4-4BB0-9B20-3ACBBD14016B@redhat.com>
Date:	Wed, 13 Jan 2016 16:25:32 +0800
From:	"Yan, Zheng" <zyan@...hat.com>
To:	Nicholas Krause <xerofoify@...il.com>
Cc:	sage@...hat.com, idryomov@...il.com, ceph-devel@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND] ceph:Remove unneeded locking/unlocking of session mutex in the function drop_leases


> On Jan 12, 2016, at 21:36, Nicholas Krause <xerofoify@...il.com> wrote:
> 
> This removes the unneeded lock/unlocking of the session mutex as
> part of the structure pointer s of type ceph_mds_session as this
> locking/unlocking of the session mutex does not protect any
> critical region and thus only wastes time in acquiring and unlocking
> this mutex in the function drop_leases.
> 
> Signed-off-by: Nicholas Krause <xerofoify@...il.com>
> ---
> fs/ceph/mds_client.c | 2 --
> 1 file changed, 2 deletions(-)
> 
> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
> index 51cb02d..f987054 100644
> --- a/fs/ceph/mds_client.c
> +++ b/fs/ceph/mds_client.c
> @@ -3322,8 +3322,6 @@ static void drop_leases(struct ceph_mds_client *mdsc)
> 		if (!s)
> 			continue;
> 		mutex_unlock(&mdsc->mutex);
> -		mutex_lock(&s->s_mutex);
> -		mutex_unlock(&s->s_mutex);
> 		ceph_put_mds_session(s);
> 		mutex_lock(&mdsc->mutex);
> 	}

the lock/unlock waits any code in critical region to exit


> -- 
> 2.1.4
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ