linux/drivers/net
Taehee Yoo 43aa493799 amt: use cancel_delayed_work() instead of flush_delayed_work() in amt_fini()
When the amt module is being removed, it calls flush_delayed_work() to exit
source_gc_wq. But it wouldn't be exited properly because the
amt_source_gc_work(), which is the callback function of source_gc_wq
internally calls mod_delayed_work() again.
So, amt_source_gc_work() would be called after the amt module is removed.
Therefore kernel panic would occur.
In order to avoid it, cancel_delayed_work() should be used instead of
flush_delayed_work().

Test commands:
   modprobe amt
   modprobe -rv amt

Splat looks like:
 BUG: unable to handle page fault for address: fffffbfff80f50db
 #PF: supervisor read access in kernel mode
 #PF: error_code(0x0000) - not-present page
 PGD 1237ee067 P4D 1237ee067 PUD 1237b2067 PMD 100c11067 PTE 0
 Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC KASAN PTI
 CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.15.0+ #27
 5a0ebebc29fe5c40c68bea90197606c3a832b09f
 RIP: 0010:run_timer_softirq+0x221/0xfc0
 Code: 00 00 4c 89 e1 4c 8b 30 48 c1 e9 03 80 3c 29 00 0f 85 ed 0b 00 00
 4d 89 34 24 4d 85 f6 74 19 49 8d 7e 08 48 89 f9 48 c1 e9 03 <80> 3c 29 00
 0f 85 fa 0b 00 00 4d 89 66 08 83 04 24 01 49 89 d4 48
 RSP: 0018:ffff888119009e50 EFLAGS: 00010806
 RAX: ffff8881191f8a80 RBX: 00000000007ffe2a RCX: 1ffffffff80f50db
 RDX: ffff888119009ed0 RSI: 0000000000000008 RDI: ffffffffc07a86d8
 RBP: dffffc0000000000 R08: ffff8881191f8280 R09: ffffed102323f061
 R10: ffff8881191f8307 R11: ffffed102323f060 R12: ffff888119009ec8
 R13: 00000000000000c0 R14: ffffffffc07a86d0 R15: ffff8881191f82e8
 FS:  0000000000000000(0000) GS:ffff888119000000(0000)
 knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: fffffbfff80f50db CR3: 00000001062dc002 CR4: 00000000003706e0
 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
 Call Trace:
  <IRQ>
  ? add_timer+0x650/0x650
  ? kvm_clock_read+0x14/0x30
  ? ktime_get+0xb9/0x180
  ? rcu_read_lock_held_common+0xe/0xa0
  ? rcu_read_lock_sched_held+0x56/0xc0
  ? rcu_read_lock_bh_held+0xa0/0xa0
  ? hrtimer_interrupt+0x271/0x790
  __do_softirq+0x1d0/0x88f
  irq_exit_rcu+0xe7/0x120
  sysvec_apic_timer_interrupt+0x8a/0xb0
  </IRQ>
  <TASK>
[ ... ]

Fixes: bc54e49c14 ("amt: add multicast(IGMP) report message handler")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Link: https://lore.kernel.org/r/20211108145340.17208-1-ap420073@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-11-09 19:12:56 -08:00
..
appletalk net: remove single-byte netdev->dev_addr writes 2021-10-13 10:03:59 -07:00
arcnet net: remove single-byte netdev->dev_addr writes 2021-10-13 10:03:59 -07:00
bonding bonding: Fix a use-after-free problem when bond_sysfs_slave_add() failed 2021-11-05 10:14:38 +00:00
caif
can can: mcp251xfd: mcp251xfd_chip_start(): fix error handling for mcp251xfd_chip_rx_int_enable() 2021-11-06 21:25:25 +01:00
dsa net: dsa: mv88e6xxx: Don't support >1G speeds on 6191X on ports other than 10 2021-11-09 19:09:12 -08:00
ethernet gve: Fix off by one in gve_tx_timeout() 2021-11-09 13:58:46 +00:00
fddi fddi: defza: add missing pointer type cast 2021-10-25 10:28:47 -07:00
fjes net: fjes: constify and use eth_hw_addr_set() 2021-10-22 10:16:07 -07:00
hamradio hamradio: defer 6pack kfree after unregister_netdev 2021-11-09 11:49:12 +00:00
hippi net: hippi: use dev_addr_set() 2021-10-22 10:16:09 -07:00
hyperv hv_netvsc: Add comment of netvsc_xdp_xmit() 2021-10-14 19:17:57 -07:00
ieee802154 ieee802154: Remove redundant 'flush_workqueue()' calls 2021-10-19 13:23:38 +01:00
ipa
ipvlan net: ipvtap: fix template string argument of device_create() call 2021-10-16 08:51:22 +01:00
mctp
mdio
netdevsim netdevsim: fix uninit value in nsim_drv_configure_vfs() 2021-11-01 16:29:56 -07:00
pcs net: convert users of bitmap_foo() to linkmode_foo() 2021-10-24 13:58:52 +01:00
phy net: phy: fix duplex out of sync problem while changing settings 2021-11-04 16:46:29 -07:00
plip net: plip: use eth_hw_addr_set() 2021-10-22 10:16:14 -07:00
ppp
slip
team
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-10-28 10:43:58 -07:00
vmxnet3 net: vmxnet3: remove multiple false checks in vmxnet3_ethtool.c 2021-11-01 16:35:27 -07:00
wan net: hldc_fr: use dev_addr_set() 2021-10-22 10:16:18 -07:00
wireguard
wireless Core: 2021-11-02 06:20:58 -07:00
wwan
xen-netback net: xen: use eth_hw_addr_set() 2021-10-22 10:15:54 -07:00
amt.c amt: use cancel_delayed_work() instead of flush_delayed_work() in amt_fini() 2021-11-09 19:12:56 -08:00
bareudp.c net: bareudp: fix duplicate checks of data[] expressions 2021-10-29 13:41:28 +01:00
dummy.c
eql.c
geneve.c
gtp.c
ifb.c ifb: fix building without CONFIG_NET_CLS_ACT 2021-10-29 14:01:11 +01:00
Kconfig amt: add IPV6 Kconfig dependency 2021-11-09 14:00:13 +00:00
LICENSE.SRC
loopback.c
macsec.c net: drivers: get ready for const netdev->dev_addr 2021-10-24 13:59:45 +01:00
macvlan.c net: drivers: get ready for const netdev->dev_addr 2021-10-24 13:59:45 +01:00
macvtap.c net: macvtap: fix template string argument of device_create() call 2021-10-16 08:51:21 +01:00
Makefile amt: add control plane of amt interface 2021-11-01 13:36:08 +00:00
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c net: sb1000,rionet: use eth_hw_addr_set() 2021-10-22 10:16:16 -07:00
sb1000.c net: sb1000,rionet: use eth_hw_addr_set() 2021-10-22 10:16:16 -07:00
Space.c
sungem_phy.c net: sungem_phy: fix code indentation 2021-11-09 11:45:54 +00:00
tap.c
thunderbolt.c net: thunderbolt: use eth_hw_addr_set() 2021-10-27 17:13:36 -07:00
tun.c
veth.c
virtio_net.c net: virtio: use eth_hw_addr_set() 2021-10-28 07:47:30 -07:00
vrf.c vrf: run conntrack only in context of lower/physdev for locally generated packets 2021-10-26 13:21:10 +01:00
vsockmon.c
vxlan.c
xen-netfront.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-10-28 10:43:58 -07:00