[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220630114130.627252-1-michael@walle.cc>
Date: Thu, 30 Jun 2022 13:41:30 +0200
From: Michael Walle <michael@...le.cc>
To: vladimir.oltean@....com
Cc: andrew@...n.ch, davem@...emloft.net, edumazet@...gle.com,
hkallweit1@...il.com, kuba@...nel.org, linux@...linux.org.uk,
netdev@...r.kernel.org, pabeni@...hat.com,
rmk+kernel@...linux.org.uk, Michael Walle <michael@...le.cc>
Subject: Re: [PATCH net-next] net: phylink: fix NULL pl->pcs dereference during phylink_pcs_poll_start
> The current link mode of the phylink instance may not require an
> attached PCS. However, phylink_major_config() unconditionally
> dereferences this potentially NULL pointer when restarting the link poll
> timer, which will panic the kernel.
>
> Fix the problem by checking whether a PCS exists in phylink_pcs_poll_start(),
> otherwise do nothing. The code prior to the blamed patch also only
> looked at pcs->poll within an "if (pcs)" block.
>
> Fixes: bfac8c490d60 ("net: phylink: disable PCS polling over major configuration")
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
Tested-by: Michael Walle <michael@...le.cc> # on kontron-kbox-a-230-ls
-michael
Powered by blists - more mailing lists