Searched hist:"7 fbf6795d127a3b1bb39b0e42579904cf6db1624" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/net/ethernet/mscc/ |
H A D | ocelot.c | diff 7fbf6795d127a3b1bb39b0e42579904cf6db1624 Thu Feb 10 09:04:51 CST 2022 Colin Foster <colin.foster@in-advantage.com> net: mscc: ocelot: fix mutex lock error during ethtool stats read
An ongoing workqueue populates the stats buffer. At the same time, a user might query the statistics. While writing to the buffer is mutex-locked, reading from the buffer wasn't. This could lead to buggy reads by ethtool.
This patch fixes the former blamed commit, but the bug was introduced in the latter.
Signed-off-by: Colin Foster <colin.foster@in-advantage.com> Fixes: 1e1caa9735f90 ("ocelot: Clean up stats update deferred work") Fixes: a556c76adc052 ("net: mscc: Add initial Ocelot switch support") Reported-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Link: https://lore.kernel.org/all/20220210150451.416845-2-colin.foster@in-advantage.com/ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|