]> git.baikalelectronics.ru Git - kernel.git/commit
net: mdiobus: Disable preemption upon u64_stats update
authorAhmed S. Darwish <a.darwish@linutronix.de>
Wed, 3 Jun 2020 14:49:47 +0000 (16:49 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Jun 2020 22:50:42 +0000 (15:50 -0700)
commit14ff0f1ee3be50305da579f12cf5bd773d290b31
treea0d67fe433ec03508860a48ea59db759a5a1552d
parent962176e45353f695742197a2017add42a6eeaae4
net: mdiobus: Disable preemption upon u64_stats update

The u64_stats mechanism uses sequence counters to protect against 64-bit
values tearing on 32-bit architectures. Updating u64_stats is thus a
sequence counter write side critical section where preemption must be
disabled.

For mdiobus_stats_acct(), disable preemption upon the u64_stats update.
It is called from process context through mdiobus_read() and
mdiobus_write().

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mdio_bus.c