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] [day] [month] [year] [list]
Date:   Mon, 16 Jul 2018 09:26:47 +0800
From:   piaojun <piaojun@...wei.com>
To:     Dominique Martinet <asmadeus@...ewreck.org>
CC:     "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        <ericvh@...il.com>, <rminnich@...dia.gov>, <lucho@...kov.net>,
        <v9fs-developer@...ts.sourceforge.net>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [V9fs-developer] [PATCH] net/9p/client.c: fix misuse of
 spin_lock_irqsave for p9_client lock

Hi Dominique,

On 2018/7/12 15:01, Dominique Martinet wrote:
> piaojun wrote on Thu, Jul 12, 2018:
>> In p9_read_work(), we use spin_lock for client->lock, but misuse
>> spin_lock_irqsave for it in p9_fid_create(). As p9_client lock won't be
>> locked in irq context, so spin_lock is enough. And that will improve the
>> performance.
> 
> Agreed on principle, see remark below
> 
>> Signed-off-by: Jun Piao <piaojun@...wei.com>
>> ---
>>  net/9p/client.c   | 17 +++++++----------
>>  net/9p/trans_fd.c |  7 +++----
>>  2 files changed, 10 insertions(+), 14 deletions(-)
>>
>> diff --git a/net/9p/client.c b/net/9p/client.c
>> index 8bc8b3e..b05cbfc 100644
>> --- a/net/9p/client.c
>> +++ b/net/9p/client.c
>> @@ -260,7 +260,6 @@ static struct p9_fcall *p9_fcall_alloc(int alloc_msize)
>>  static struct p9_req_t *
>>  p9_tag_alloc(struct p9_client *c, u16 tag, unsigned int max_size)
>>  {
>> -	unsigned long flags;
>>  	int row, col;
>>  	struct p9_req_t *req;
>>  	int alloc_msize = min(c->msize, max_size);
>> @@ -270,7 +269,7 @@ static struct p9_fcall *p9_fcall_alloc(int alloc_msize)
>>  	tag++;
>>
>>  	if (tag >= c->max_tag) {
>> -		spin_lock_irqsave(&c->lock, flags);
>> +		spin_lock(&c->lock);
> 
> This code doesn't exist anymore with Matthew's idr rework, could you
> submit that patch based on top of my 9p-next branch?
> (unless you really want Andrew to take this for the next 4.18-rc, but
> I'm not convinced this qualifies)

OK, I will rebase my patch and resend later.

Thanks,
Jun

> 
> Please see my "Current 9P patches - test branch" for details:
> https://sourceforge.net/p/v9fs/mailman/message/36365359/
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ