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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 11 Nov 2020 04:32:25 -0800
From:   Richard Cochran <richardcochran@...il.com>
To:     Wang Qing <wangqing@...o.com>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Grygorii Strashko <grygorii.strashko@...com>,
        Samuel Zou <zou_wei@...wei.com>,
        Kurt Kanzenbach <kurt@...utronix.de>,
        Murali Karicheri <m-karicheri2@...com>,
        Ivan Khoronzhuk <ivan.khoronzhuk@...aro.org>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V4 net-bugfixs] net/ethernet: Update ret when ptp_clock
 is ERROR

On Wed, Nov 11, 2020 at 05:24:41PM +0800, Wang Qing wrote:
> We always have to update the value of ret, otherwise the error value
>  may be the previous one. And ptp_clock_register() never return NULL
>  when PTP_1588_CLOCK enable.

NAK.

Your code must handle the possibility that ptp_clock_register() can
return NULL.  Why?

1. Because that follows the documented API.

2. Because people will copy/paste this driver.

3. Because the Kconfig for your driver can change without warning.

Thanks,
Richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ