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  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]
Date:   Fri, 10 Apr 2020 14:21:26 +0900
From:   Keita Suzuki <keitasuzuki.park@...ab.ics.keio.ac.jp>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Kubota Takafumi <takafumi.kubota1012@...ab.ics.keio.ac.jp>,
        "David S. Miller" <davem@...emloft.net>,
        "open list:NETRONOME ETHERNET DRIVERS" <oss-drivers@...ronome.com>,
        "open list:NETWORKING DRIVERS" <netdev@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] nfp: Fix memory leak in nfp_resource_acquire()

Hi,

Thanks for reviewing.

I'll check back the runtime log and see what I can do.
Thanks.


2020年4月10日(金) 4:32 Jakub Kicinski <kuba@...nel.org>:
>
> On Thu,  9 Apr 2020 17:41:11 +0000 Keita Suzuki wrote:
> > This patch fixes a memory leak in nfp_resource_acquire(). res->mutex is
> > alllocated in nfp_resource_try_acquire(). However, when
> > msleep_interruptible() or time_is_before_eq_jiffies() fails, it falls
> > into err_fails path where res is freed, but res->mutex is not.
> >
> > Fix this by changing call to free to nfp_resource_release().
>
> I don't see a leak here. Maybe you could rephrase the description to
> make things clearer?
>
> AFAICS nfp_resource_try_acquire() calls nfp_cpp_mutex_free(res->mutex)
> if it's about to return an error. We can only hit msleep or time check
> if it returned an error.

Powered by blists - more mailing lists