linux-stable/drivers/net/phy/qcom
Christian Marangi 6a4aee2777 net: phy: qcom: at803x: fix kernel panic with at8031_probe
On reworking and splitting the at803x driver, in splitting function of
at803x PHYs it was added a NULL dereference bug where priv is referenced
before it's actually allocated and then is tried to write to for the
is_1000basex and is_fiber variables in the case of at8031, writing on
the wrong address.

Fix this by correctly setting priv local variable only after
at803x_probe is called and actually allocates priv in the phydev struct.

Reported-by: William Wortel <wwortel@dorpstraat.com>
Cc: <stable@vger.kernel.org>
Fixes: 25d2ba9400 ("net: phy: at803x: move specific at8031 probe mode check to dedicated probe")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20240325190621.2665-1-ansuelsmth@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2024-03-28 10:42:22 +01:00
..
at803x.c net: phy: qcom: at803x: fix kernel panic with at8031_probe 2024-03-28 10:42:22 +01:00
Kconfig net: phy: qcom: add support for QCA807x PHY Family 2024-02-10 15:36:19 +00:00
Makefile net: phy: qcom: add support for QCA807x PHY Family 2024-02-10 15:36:19 +00:00
qca83xx.c net: phy: qcom: deatch qca83xx PHY driver from at803x 2024-01-31 16:25:17 -08:00
qca807x.c net: phy: qca807x: fix compilation when CONFIG_GPIOLIB is not set 2024-03-06 20:39:29 -08:00
qca808x.c net: phy: qcom: qca808x: fill in possible_interfaces 2024-03-01 08:56:39 +00:00
qcom-phy-lib.c net: phy: qcom: generalize some qca808x LED functions 2024-02-10 15:36:20 +00:00
qcom.h net: phy: qcom: generalize some qca808x LED functions 2024-02-10 15:36:20 +00:00