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:   Mon, 26 Nov 2018 18:20:56 +0800
From:   YueHaibing <yuehaibing@...wei.com>
To:     Richard Cochran <richardcochran@...il.com>
CC:     <davem@...emloft.net>, <dmitry.torokhov@...il.com>,
        <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>
Subject: Re: [PATCH v2 net-next] ptp: Fix pass zero to ERR_PTR() in
 ptp_clock_register



On 2018/11/24 0:37, Richard Cochran wrote:
> On Fri, Nov 23, 2018 at 09:54:55AM +0800, YueHaibing wrote:
>> @@ -264,6 +266,7 @@ struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info,
>>  		pps.owner = info->owner;
>>  		ptp->pps_source = pps_register_source(&pps, PTP_PPS_DEFAULTS);
>>  		if (!ptp->pps_source) {
>> +			err = -EINVAL;
> 
> Bonus points:  The function, pps_register_source(), keeps error codes
> in a local variable, but it does not make use of the code.  There are
> only five callers of that function, and so it would be nice to let
> pps_register_source() return the error code.

Ok, I will post a new patch to do it.

> 
> For the present patch:
> 
> Acked-by: Richard Cochran <richardcochran@...il.com>
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ