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]
Message-ID: <20100329154109.GF5069@bicker>
Date:	Mon, 29 Mar 2010 18:41:09 +0300
From:	Dan Carpenter <error27@...il.com>
To:	giulio.benetti@...ronovasrl.com
Cc:	grant.likely@...retlab.ca, jeremy.kerr@...onical.com,
	afleming@...escale.com, jezz@...mic.org,
	devicetree-discuss@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
	David Miller <davem@...emloft.net>
Subject: Re: [patch] of: check for IS_ERR()

On Fri, Feb 26, 2010 at 01:54:20AM -0800, David Miller wrote:
> From: Dan Carpenter <error27@...il.com>
> Date: Fri, 26 Feb 2010 12:49:41 +0300
> 
> > get_phy_device() can return an ERR_PTR()
> > 
> > Signed-off-by: Dan Carpenter <error27@...il.com>
> > ---
> > I don't have a cross compile environment set up so I can't even compile 
> > test this.  :/  But err.h is included so it should be OK.
> 
> It should return ERR_PTR() consistently.  Checking for both
> NULL and ERR_PTR() is undesirable.

Hi Giulio,

get_phy_device() currently returns NULL because of: 3ee82383f0098a2 "phy: 
fix phy address bug".  If I change it to return ERR_PTR(-ENODEV) that
will mean we break out of the loop with an error in mdiobus_register()
where before we would just continue on.

drivers/net/phy/mdio_bus.c
   119                          phydev = mdiobus_scan(bus, i);
   120                          if (IS_ERR(phydev)) {
   121                                  err = PTR_ERR(phydev);
   122                                  goto error;
   123                          }

Is that OK?

I'm not really familiar with this hardware at all, I'm just going based
on static analysis. :/

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ