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] [thread-next>] [day] [month] [year] [list]
Message-ID: <48655BAC.8080800@ru.mvista.com>
Date:	Sat, 28 Jun 2008 01:29:16 +0400
From:	Sergei Shtylyov <sshtylyov@...mvista.com>
To:	Nye Liu <nyet@...t.org>
Cc:	linux-kernel@...r.kernel.org, linuxppc-dev@...abs.org,
	netdev@...r.kernel.org
Subject: Re: [PATCH] FS_ENET: Don't attempt to set mii_speed when fec_inf
 is null

Hello.

Nye Liu wrote:
> From: Nye Liu <nyet@....com>
>
> When using CONFIG_FIXED_PHY, fec_inf (fep->phydev->bus->priv) is NULL in
> fs_enet/mac-fec.c restart(). Dereferencing fec_inf when trying to set the
> mii_speed causes a kernel oops.
>
> Signed-off-by: Nye Liu <nyet@....com>
>
> ---
>
> diff --git a/drivers/net/fs_enet/mac-fec.c b/drivers/net/fs_enet/mac-fec.c
> index 8a311d1..350bc73 100644
> --- a/drivers/net/fs_enet/mac-fec.c
> +++ b/drivers/net/fs_enet/mac-fec.c
> @@ -328,7 +328,8 @@ static void restart(struct net_device *dev)
>         /*
>          * Set MII speed.
>          */
> -       FW(fecp, mii_speed, fec_inf->mii_speed);
> +       if (fec_inf)
> +           FW(fecp, mii_speed, fec_inf->mii_speed);
>   

   Alas, Your patch is whitespace damaged.


WBR, Sergei


--
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