Eric Dumazet
b8bd72d317
bonding/main: fix NULL dereference in bond_select_active_slave()
...
A bonding master can be up while best_slave is NULL.
[12105.636318] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
[12105.638204] mlx4_en: eth1: Linkstate event 1 -> 1
[12105.648984] IP: bond_select_active_slave+0x125/0x250
[12105.653977] PGD 0 P4D 0
[12105.656572] Oops: 0000 [#1 ] SMP PTI
[12105.660487] gsmi: Log Shutdown Reason 0x03
[12105.664620] Modules linked in: kvm_intel loop act_mirred uhaul vfat fat stg_standard_ftl stg_megablocks stg_idt stg_hdi stg elephant_dev_num stg_idt_eeprom w1_therm wire i2c_mux_pca954x i2c_mux mlx4_i2c i2c_usb cdc_acm ehci_pci ehci_hcd i2c_iimc mlx4_en mlx4_ib ib_uverbs ib_core mlx4_core [last unloaded: kvm_intel]
[12105.685686] mlx4_core 0000:03:00.0: dispatching link up event for port 2
[12105.685700] mlx4_en: eth2: Linkstate event 2 -> 1
[12105.685700] mlx4_en: eth2: Link Up (linkstate)
[12105.724452] Workqueue: bond0 bond_mii_monitor
[12105.728854] RIP: 0010:bond_select_active_slave+0x125/0x250
[12105.734355] RSP: 0018:ffffaf146a81fd88 EFLAGS: 00010246
[12105.739637] RAX: 0000000000000003 RBX: ffff8c62b03c6900 RCX: 0000000000000000
[12105.746838] RDX: 0000000000000000 RSI: ffffaf146a81fd08 RDI: ffff8c62b03c6000
[12105.754054] RBP: ffffaf146a81fdb8 R08: 0000000000000001 R09: ffff8c517d387600
[12105.761299] R10: 00000000001075d9 R11: ffffffffaceba92f R12: 0000000000000000
[12105.768553] R13: ffff8c8240ae4800 R14: 0000000000000000 R15: 0000000000000000
[12105.775748] FS: 0000000000000000(0000) GS:ffff8c62bfa40000(0000) knlGS:0000000000000000
[12105.783892] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[12105.789716] CR2: 0000000000000000 CR3: 0000000d0520e001 CR4: 00000000001626f0
[12105.796976] Call Trace:
[12105.799446] [<ffffffffac31d387>] bond_mii_monitor+0x497/0x6f0
[12105.805317] [<ffffffffabd42643>] process_one_work+0x143/0x370
[12105.811225] [<ffffffffabd42c7a>] worker_thread+0x4a/0x360
[12105.816761] [<ffffffffabd48bc5>] kthread+0x105/0x140
[12105.821865] [<ffffffffabd42c30>] ? rescuer_thread+0x380/0x380
[12105.827757] [<ffffffffabd48ac0>] ? kthread_associate_blkcg+0xc0/0xc0
[12105.834266] [<ffffffffac600241>] ret_from_fork+0x51/0x60
Fixes: e2a7420df2e0 ("bonding/main: convert to using slave printk macros")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: John Sperbeck <jsperbeck@google.com>
Cc: Jarod Wilson <jarod@redhat.com>
CC: Jay Vosburgh <j.vosburgh@gmail.com>
CC: Veaceslav Falico <vfalico@gmail.com>
CC: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-07-02 15:14:48 -07:00
..
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-13 10:35:55 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:41 -07:00
2019-06-20 15:06:24 +02:00
2019-06-13 17:34:56 -10:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:06 +02:00
2019-06-21 09:58:42 -07:00
2019-06-19 17:11:22 +02:00
2019-06-28 08:50:09 +08:00
2019-06-19 17:09:55 +02:00
2019-06-17 22:28:29 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-13 17:34:56 -10:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:07 +02:00
2019-06-05 17:37:17 +02:00
2019-05-30 11:29:53 -07:00
2019-06-19 17:09:55 +02:00
2019-06-21 09:58:42 -07:00
2019-06-08 12:52:42 -07:00
2019-06-19 17:09:11 +02:00
2019-06-19 17:09:55 +02:00
2019-06-21 11:03:33 -07:00
2019-06-28 08:39:18 +08:00
2019-06-05 17:37:07 +02:00
2019-06-05 17:37:05 +02:00
2019-06-19 17:09:55 +02:00
2019-06-22 08:59:24 -04:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:06 +02:00
2019-06-21 10:20:19 -07:00
2019-06-28 16:03:54 -07:00
2019-06-21 09:58:42 -07:00
2019-06-22 14:08:47 -07:00
2019-06-05 17:37:17 +02:00
2019-06-21 09:58:42 -07:00
2019-06-07 11:00:14 -07:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:14 +02:00
2019-06-19 17:09:08 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:17 +02:00
2019-06-28 08:48:21 +08:00
2019-06-22 08:59:24 -04:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-25 03:41:03 +08:00
2019-06-21 10:18:16 -07:00
2019-06-21 09:58:42 -07:00
2019-06-24 21:23:55 +08:00
2019-07-02 15:14:48 -07:00
2019-07-02 12:00:50 -07:00
2019-06-05 17:36:37 +02:00
2019-06-13 17:34:56 -10:00
2019-06-07 14:04:28 -06:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:16 +02:00
2019-06-19 17:09:55 +02:00
2019-06-08 12:52:42 -07:00
2019-06-19 17:09:55 +02:00
2019-06-27 21:06:39 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:04 +02:00
2019-05-30 11:26:39 -07:00
2019-06-15 13:43:06 -07:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:37 -07:00
2019-06-07 23:21:39 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-27 10:18:24 -07:00
2019-06-27 21:06:39 -07:00
2019-06-21 09:58:42 -07:00
2019-06-10 18:07:39 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:36:37 +02:00
2019-06-25 08:05:34 +03:00
2019-06-22 08:59:24 -04:00
2019-06-22 08:59:24 -04:00
2019-06-05 17:36:37 +02:00
2019-06-19 17:09:55 +02:00
2019-06-14 14:25:43 +03:00
2019-06-19 17:09:55 +02:00
2019-06-20 11:56:35 +02:00
2019-06-19 17:09:07 +02:00
2019-06-19 17:09:55 +02:00
2019-06-22 08:59:24 -04:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00