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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAMZdPi-8dRVioPUWcOABZsT53mQrji1sDjMWnLQzdXKhBd4-rA@mail.gmail.com>
Date:   Thu, 27 Oct 2022 08:28:23 +0200
From:   Loic Poulain <loic.poulain@...aro.org>
To:     "zhaoping.shu" <zhaoping.shu@...iatek.com>
Cc:     m.chetan.kumar@...el.com, linuxwwan@...el.com,
        ryazanov.s.a@...il.com, johannes@...solutions.net,
        davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
        pabeni@...hat.com, srv_heupstream@...iatek.com,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        haijun.liu@...iatek.com, xiayu.zhang@...iatek.com,
        lambert.wang@...iatek.com, "hw . he" <hw.he@...iatek.com>
Subject: Re: [PATCH net v1] net: wwan: iosm: fix memory leak in ipc_wwan_dellink

On Thu, 27 Oct 2022 at 04:08, zhaoping.shu <zhaoping.shu@...iatek.com> wrote:
>
> Hi Loic,
>
> On Wed, 2022-10-26 at 09:50 +0200, Loic Poulain wrote:
> > Hi Zhaoping,
> >
> > On Wed, 26 Oct 2022 at 04:02, zhaoping.shu <zhaoping.shu@...iatek.com
> > > wrote:
> > >
> > > From: hw.he <hw.he@...iatek.com>
> > >
> > > IOSM driver registers network device without setting the
> > > needs_free_netdev flag, and does NOT call free_netdev() when
> > > unregisters network device, which causes a memory leak.
> > >
> > > This patch sets needs_free_netdev to true when registers
> > > network device, which makes netdev subsystem call free_netdev()
> > > automatically after unregister_netdevice().
> > >
> > > Signed-off-by: hw.he <hw.he@...iatek.com>
> > > Signed-off-by: zhaoping.shu <zhaoping.shu@...iatek.com>
> >
> > Could you please add a corresponding 'fixes' tag.
> This issue was introduced in the first commit of this driver:
> Fixes: 2a54f2c77934 ("net: iosm: net driver")

Ok, fine, then simply send a V2 with that tag.
You can append mine as well:

Reviewed-by: Loic Poulain <loic.poulain@...aro.org>


>
> >
> > > ---
> > >  drivers/net/wwan/iosm/iosm_ipc_wwan.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/drivers/net/wwan/iosm/iosm_ipc_wwan.c
> > > b/drivers/net/wwan/iosm/iosm_ipc_wwan.c
> > > index 2f1f8b5d5b59..0108d8d01ff2 100644
> > > --- a/drivers/net/wwan/iosm/iosm_ipc_wwan.c
> > > +++ b/drivers/net/wwan/iosm/iosm_ipc_wwan.c
> > > @@ -168,6 +168,7 @@ static void ipc_wwan_setup(struct net_device
> > > *iosm_dev)
> > >         iosm_dev->max_mtu = ETH_MAX_MTU;
> > >
> > >         iosm_dev->flags = IFF_POINTOPOINT | IFF_NOARP;
> > > +       iosm_dev->needs_free_netdev = true;
> >
> > Look like we have the same problem in mhi_wwan_mbim driver, would you
> > be able to submit a change for it as well?
> We will submit another patch to fix it, since this patch is dedicated
> for iosm.

Powered by blists - more mailing lists