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-next>] [day] [month] [year] [list]
Message-ID: <1381690794.2848.11.camel@alpha.Speedport_W723_V_Typ_A_1_00_098>
Date:	Sun, 13 Oct 2013 20:59:54 +0200
From:	"Sebastian Pöhn" <sebastian.poehn@...il.com>
To:	driverdev-devel@...uxdriverproject.org
Cc:	netdev@...r.kernel.org, support@...iumnetworks.com
Subject: [PATCH] staging: octeon-ethernet: trivial: Avoid OOPS if phydev is
 not set

A zero pointer deref on priv->phydev->link was causing oops on our systems.
Might be related to improper configuration but we should fail gracefully here ;-)

Signed-off-by: Sebastian Poehn <sebastian.poehn@...glemail.com>

---

diff --git a/drivers/staging/octeon/ethernet-mdio.c b/drivers/staging/octeon/ethernet-mdio.c
index 83b1030..bc8c503 100644
--- a/drivers/staging/octeon/ethernet-mdio.c
+++ b/drivers/staging/octeon/ethernet-mdio.c
@@ -121,6 +121,9 @@ static void cvm_oct_adjust_link(struct net_device *dev)
        struct octeon_ethernet *priv = netdev_priv(dev);
        cvmx_helper_link_info_t link_info;
 
+       if(!priv->phydev)
+               return ;
+
        if (priv->last_link != priv->phydev->link) {
                priv->last_link = priv->phydev->link;
                link_info.u64 = 0;



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ