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]
Date:   Thu, 27 Aug 2020 09:00:48 -0400
From:   Murali Karicheri <m-karicheri2@...com>
To:     David Miller <davem@...emloft.net>
CC:     <kuba@...nel.org>, <grygorii.strashko@...com>, <nsekhar@...com>,
        <linux-omap@...r.kernel.org>, <netdev@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [net v3 PATCH] net: ethernet: ti: cpsw_new: fix error handling in
 cpsw_ndo_vlan_rx_kill_vid()

Hi Dave,

On 8/25/20 12:36 PM, David Miller wrote:
> From: Murali Karicheri <m-karicheri2@...com>
> Date: Mon, 24 Aug 2020 13:01:00 -0400
> 
>> +	ret = cpsw_ale_del_vlan(cpsw->ale, vid, 0);
>> +	if (ret)
>> +		dev_err(priv->dev, "%s: failed %d: ret %d\n",
>> +			__func__, __LINE__, ret);
>> +	ret = cpsw_ale_del_ucast(cpsw->ale, priv->mac_addr,
>> +				 HOST_PORT_NUM, ALE_VLAN, vid);
>> +	if (ret)
>> +		dev_err(priv->dev, "%s: failed %d: ret %d\n",
>> +			__func__, __LINE__, ret);
>> +	ret = cpsw_ale_del_mcast(cpsw->ale, priv->ndev->broadcast,
>> +				 0, ALE_VLAN, vid);
>> +	if (ret)
>> +		dev_err(priv->dev, "%s: failed %d: ret %d\n",
>> +			__func__, __LINE__, ret);
>>   	cpsw_ale_flush_multicast(cpsw->ale, ALE_PORT_HOST, vid);
> 
> These error messages are extremely unhelpful.  You're calling three
> different functions, yet emitting basically the same __func__ for
> each of those cases.  No user can send you a useful bug report
> immediately if they just have func and line.
> 
> Please get rid of the "__func__" and "__line__" stuff completely, it's
> never advisable to ever use that in my opinion.  Instead, describe
> which delete operation failed, optionally with the error return.
> 
OK. I had considered your suggestion, but thought having a line number
would be handy for a developer. Function name would be better. Will
re-send with changes as you have suggested.

-- 
Murali Karicheri
Texas Instruments

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ