linux_dsm_epyc7002/drivers/net/dsa
Andrew Lunn f6d9758b12 net: dsa: mv88e6xxx: Add lockdep classes to fix false positive splat
The following false positive lockdep splat has been observed.

======================================================
WARNING: possible circular locking dependency detected
4.20.0+ #302 Not tainted
------------------------------------------------------
systemd-udevd/160 is trying to acquire lock:
edea6080 (&chip->reg_lock){+.+.}, at: __setup_irq+0x640/0x704

but task is already holding lock:
edff0340 (&desc->request_mutex){+.+.}, at: __setup_irq+0xa0/0x704

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-> #1 (&desc->request_mutex){+.+.}:
       mutex_lock_nested+0x1c/0x24
       __setup_irq+0xa0/0x704
       request_threaded_irq+0xd0/0x150
       mv88e6xxx_probe+0x41c/0x694 [mv88e6xxx]
       mdio_probe+0x2c/0x54
       really_probe+0x200/0x2c4
       driver_probe_device+0x5c/0x174
       __driver_attach+0xd8/0xdc
       bus_for_each_dev+0x58/0x7c
       bus_add_driver+0xe4/0x1f0
       driver_register+0x7c/0x110
       mdio_driver_register+0x24/0x58
       do_one_initcall+0x74/0x2e8
       do_init_module+0x60/0x1d0
       load_module+0x1968/0x1ff4
       sys_finit_module+0x8c/0x98
       ret_fast_syscall+0x0/0x28
       0xbedf2ae8

-> #0 (&chip->reg_lock){+.+.}:
       __mutex_lock+0x50/0x8b8
       mutex_lock_nested+0x1c/0x24
       __setup_irq+0x640/0x704
       request_threaded_irq+0xd0/0x150
       mv88e6xxx_g2_irq_setup+0xcc/0x1b4 [mv88e6xxx]
       mv88e6xxx_probe+0x44c/0x694 [mv88e6xxx]
       mdio_probe+0x2c/0x54
       really_probe+0x200/0x2c4
       driver_probe_device+0x5c/0x174
       __driver_attach+0xd8/0xdc
       bus_for_each_dev+0x58/0x7c
       bus_add_driver+0xe4/0x1f0
       driver_register+0x7c/0x110
       mdio_driver_register+0x24/0x58
       do_one_initcall+0x74/0x2e8
       do_init_module+0x60/0x1d0
       load_module+0x1968/0x1ff4
       sys_finit_module+0x8c/0x98
       ret_fast_syscall+0x0/0x28
       0xbedf2ae8

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&desc->request_mutex);
                               lock(&chip->reg_lock);
                               lock(&desc->request_mutex);
  lock(&chip->reg_lock);

&desc->request_mutex refer to two different mutex. #1 is the GPIO for
the chip interrupt. #2 is the chained interrupt between global 1 and
global 2.

Add lockdep classes to the GPIO interrupt to avoid this.

Reported-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-24 22:21:23 -08:00
..
b53 net: dsa: b53: Do not program CPU port's PVID 2019-02-15 20:37:54 -08:00
microchip net: dsa: microchip: add port_cleanup function 2019-02-24 17:49:59 -08:00
mv88e6xxx net: dsa: mv88e6xxx: Add lockdep classes to fix false positive splat 2019-02-24 22:21:23 -08:00
bcm_sf2_cfp.c net: dsa: bcm_sf2: Remove set but not used variables 'v6_spec, v6_m_spec' 2019-02-17 15:31:47 -08:00
bcm_sf2_regs.h net: dsa: bcm_sf2: Add support for CFP statistics 2019-02-08 22:11:07 -08:00
bcm_sf2.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-02-20 00:34:07 -08:00
bcm_sf2.h net: dsa: bcm_sf2: Add support for CFP statistics 2019-02-08 22:11:07 -08:00
dsa_loop_bdinfo.c net: dsa: Mock-up driver 2017-04-01 12:39:32 -07:00
dsa_loop.c net: phy: fixed-phy: Drop GPIO from fixed_phy_add() 2019-02-04 18:33:36 -08:00
dsa_loop.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig net: dsa: lantiq_gswip: Depend on HAS_IOMEM 2018-09-25 20:27:43 -07:00
lan9303_i2c.c net: dsa: lan9303: Adjust indenting 2017-11-08 13:29:06 +09:00
lan9303_mdio.c net: dsa: lan9303: Adjust indenting 2017-11-08 13:29:06 +09:00
lan9303-core.c net: dsa: Pass stringset to ethtool operations 2018-04-27 11:53:03 -04:00
lan9303.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-11-04 09:26:51 +09:00
lantiq_gswip.c net: dsa: lantiq_gswip: drop bogus drvdata check 2019-01-17 12:12:19 -08:00
lantiq_pce.h net: dsa: Add Lantiq / Intel DSA driver for vrx200 2018-09-13 08:14:33 -07:00
Makefile net: dsa: Add Lantiq / Intel DSA driver for vrx200 2018-09-13 08:14:33 -07:00
mt7530.c net: dsa: mt7530: support the 7530 switch on the Mediatek MT7621 SoC 2019-01-30 14:26:07 -08:00
mt7530.h net: dsa: mt7530: support the 7530 switch on the Mediatek MT7621 SoC 2019-01-30 14:26:07 -08:00
mv88e6060.c mv88e6060: disable hardware level MAC learning 2018-12-03 16:04:21 -08:00
mv88e6060.h net: dsa: Keep the mii bus and address in the private structure 2016-04-13 18:15:23 -04:00
qca8k.c net: dsa: qca8k: Enable delay for RGMII_ID mode 2019-02-19 13:19:14 -08:00
qca8k.h net: dsa: qca8k: Enable delay for RGMII_ID mode 2019-02-19 13:19:14 -08:00
realtek-smi.c net: dsa: realtek-smi: fix OF child-node lookup 2019-01-17 14:04:49 -08:00
realtek-smi.h net: dsa: realtek-smi: Add Realtek SMI driver 2018-07-18 13:43:38 +09:00
rtl8366.c dsa: rtl8366: Remove unused variable. 2018-07-18 14:42:18 +09:00
rtl8366rb.c net: dsa: rtl8366rb: Support port 4 (WAN) 2018-08-09 14:15:00 -07:00
vitesse-vsc73xx.c net: dsa: vsc73xx: Make some functions static 2018-07-05 19:29:29 +09:00