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: <Z9k8RmOkKm2hQSi1@localhost.localdomain>
Date: Tue, 18 Mar 2025 10:26:30 +0100
From: Michal Kubiak <michal.kubiak@...el.com>
To: Simon Horman <horms@...nel.org>
CC: Chen Ni <nichen@...as.ac.cn>, <manishc@...vell.com>,
	<andrew+netdev@...n.ch>, <davem@...emloft.net>, <edumazet@...gle.com>,
	<kuba@...nel.org>, <pabeni@...hat.com>, <netdev@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next] qed: remove cast to pointers passed to kfree

On Mon, Mar 17, 2025 at 06:56:22PM +0000, Simon Horman wrote:
> On Tue, Mar 11, 2025 at 06:16:41PM +0100, Michal Kubiak wrote:
> > On Tue, Mar 11, 2025 at 06:08:24PM +0100, Michal Kubiak wrote:
> > > On Tue, Mar 11, 2025 at 03:06:24PM +0800, Chen Ni wrote:
> > > > Remove unnecessary casts to pointer types passed to kfree.
> > > > Issue detected by coccinelle:
> > > > @@
> > > > type t1;
> > > > expression *e;
> > > > @@
> > > > 
> > > > -kfree((t1 *)e);
> > > > +kfree(e);
> > > > 
> > > > Signed-off-by: Chen Ni <nichen@...as.ac.cn>
> > > > ---
> > > >  drivers/net/ethernet/qlogic/qed/qed_main.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c b/drivers/net/ethernet/qlogic/qed/qed_main.c
> > > > index f915c423fe70..886061d7351a 100644
> > > > --- a/drivers/net/ethernet/qlogic/qed/qed_main.c
> > > > +++ b/drivers/net/ethernet/qlogic/qed/qed_main.c
> > > > @@ -454,7 +454,7 @@ int qed_fill_dev_info(struct qed_dev *cdev,
> > > >  
> > > >  static void qed_free_cdev(struct qed_dev *cdev)
> > > >  {
> > > > -	kfree((void *)cdev);
> > > > +	kfree(cdev);
> > > >  }
> > > >  
> > > >  static struct qed_dev *qed_alloc_cdev(struct pci_dev *pdev)
> > > > -- 
> > > > 2.25.1
> > > > 
> > > > 
> > > 
> > > 
> > > LGTM.
> > > 
> > > Thanks,
> > > Reviewed-by: Michal Kubiak <michal.kubiak@...el.com>
> > > 
> > 
> > I'm sorry I missed that the patch is addressed to "net-next".
> > It rather looks like as a candidate for the "net" tree.
> > 
> > Please resend it to the "net" tree with an appropriate "Fixes" tag.
> > 
> > My apologies for the noise.
> 
> Hi Michal,
> 
> I'm unclear what bug this fixes.
> 
> It seems to me that this is a clean-up.
> That as such it should only be considered in the context
> of more material changes to this driver.

Hi Simon,

I may have gone too far in stating from the commit message that "the issue
was detected by coccinelle", so I considered it as a fix for the issue.
I agree that it can be also considered as a clean-up, so if you don't
see any problem I have no objection to sending it to "net-next".

Thanks,
Reviewed-by: Michal Kubiak <michal.kubiak@...el.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ