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]
Date:   Mon, 19 Aug 2019 16:59:55 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     jakub.kicinski@...ronome.com
Cc:     jeffrey.t.kirsher@...el.com, paul.greenwalt@...el.com,
        netdev@...r.kernel.org, nhorman@...hat.com, sassmann@...hat.com,
        andrewx.bowers@...el.com
Subject: Re: [net-next v2 04/14] ice: fix set pause param autoneg check

From: Jakub Kicinski <jakub.kicinski@...ronome.com>
Date: Mon, 19 Aug 2019 16:11:42 -0700

> On Mon, 19 Aug 2019 09:16:58 -0700, Jeff Kirsher wrote:
>> +	pcaps = devm_kzalloc(&vsi->back->pdev->dev, sizeof(*pcaps),
>> +			     GFP_KERNEL);
>> +	if (!pcaps)
>> +		return -ENOMEM;
>> +
>> +	/* Get current PHY config */
>> +	status = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_SW_CFG, pcaps,
>> +				     NULL);
>> +	if (status) {
>> +		devm_kfree(&vsi->back->pdev->dev, pcaps);
>> +		return -EIO;
>> +	}
>> +
>> +	is_an = ((pcaps->caps & ICE_AQC_PHY_AN_MODE) ?
>> +			AUTONEG_ENABLE : AUTONEG_DISABLE);
>> +
>> +	devm_kfree(&vsi->back->pdev->dev, pcaps);
> 
> Is it just me or is this use of devm_k*alloc absolutely pointless?

Yeah it looks like an overzealous use of these interfaces to me too.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ