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
| ||
|
Date: Mon, 10 Jul 2017 11:56:45 +0200 From: Richard Cochran <richardcochran@...il.com> To: Dan Carpenter <dan.carpenter@...cle.com> Cc: Ganesh Goudar <ganeshgr@...lsio.com>, Atul Gupta <atul.gupta@...lsio.com>, netdev@...r.kernel.org, kernel-janitors@...r.kernel.org Subject: Re: [PATCH 2/2 net] cxgb4: ptp_clock_register() returns error pointers On Mon, Jul 10, 2017 at 10:16:15AM +0300, Dan Carpenter wrote: > We're checking ptp_clock_register() for NULL but we should be checking > for error pointers. No. > diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c > index 50517cfd9671..c24313a103c6 100644 > --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c > +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c > @@ -441,7 +441,7 @@ void cxgb4_ptp_init(struct adapter *adapter) > > adapter->ptp_clock = ptp_clock_register(&adapter->ptp_clock_info, > &adapter->pdev->dev); > - if (!adapter->ptp_clock) { Yeah, that is wrong, but the fix is to check to IS_ERR or NULL. Thanks, Richard
Powered by blists - more mailing lists