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: <20191107.162550.125702977926999669.davem@davemloft.net>
Date:   Thu, 07 Nov 2019 16:25:50 -0800 (PST)
From:   David Miller <davem@...emloft.net>
To:     jeffrey.t.kirsher@...el.com
Cc:     anirudh.venkataramanan@...el.com, netdev@...r.kernel.org,
        nhorman@...hat.com, sassmann@...hat.com,
        anthony.l.nguyen@...el.com, andrewx.bowers@...el.com
Subject: Re: [net-next 01/15] ice: Use ice_ena_vsi and ice_dis_vsi in DCB
 configuration flow

From: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Date: Thu,  7 Nov 2019 14:14:24 -0800

> @@ -169,15 +170,23 @@ int ice_pf_dcb_cfg(struct ice_pf *pf, struct ice_dcbx_cfg *new_cfg, bool locked)
>  	}
>  
>  	/* Store old config in case FW config fails */
> -	old_cfg = devm_kzalloc(&pf->pdev->dev, sizeof(*old_cfg), GFP_KERNEL);
> -	memcpy(old_cfg, curr_cfg, sizeof(*old_cfg));
> +	old_cfg = kmemdup(curr_cfg, sizeof(*old_cfg), GFP_KERNEL);

Why not use devm_kmemdup()?  Then you don't have to add the kfree() code paths.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ