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]
Message-Id: <9b655bf1-8565-d768-04ee-bc286a7e9efe@linux.ibm.com>
Date:   Sun, 25 Aug 2019 21:36:08 +0800
From:   Julian Wiedmann <jwi@...ux.ibm.com>
To:     Markus Elfring <Markus.Elfring@....de>, linux-s390@...r.kernel.org,
        Christian Bornträger <borntraeger@...ibm.com>,
        Heiko Carstens <heiko.carstens@...ibm.com>,
        Ursula Braun <ubraun@...ux.ibm.com>,
        Vasily Gorbik <gor@...ux.ibm.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] s390/ctcm: Delete unnecessary checks before the macro call “dev_kfree_skb”

On 22.08.19 17:04, Markus Elfring wrote:
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Thu, 22 Aug 2019 10:55:33 +0200
> 
> The dev_kfree_skb() function performs also input parameter validation.
> Thus the test around the shown calls is not needed.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
> ---

Applied, thanks.

>  drivers/s390/net/ctcm_main.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/s390/net/ctcm_main.c b/drivers/s390/net/ctcm_main.c
> index f63c5c871d3d..90025d1923d2 100644
> --- a/drivers/s390/net/ctcm_main.c
> +++ b/drivers/s390/net/ctcm_main.c
> @@ -1074,10 +1074,8 @@ static void ctcm_free_netdevice(struct net_device *dev)
>  		if (grp) {
>  			if (grp->fsm)
>  				kfree_fsm(grp->fsm);
> -			if (grp->xid_skb)
> -				dev_kfree_skb(grp->xid_skb);
> -			if (grp->rcvd_xid_skb)
> -				dev_kfree_skb(grp->rcvd_xid_skb);
> +			dev_kfree_skb(grp->xid_skb);
> +			dev_kfree_skb(grp->rcvd_xid_skb);
>  			tasklet_kill(&grp->mpc_tasklet2);
>  			kfree(grp);
>  			priv->mpcg = NULL;
> --
> 2.23.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ