Lijun Pan
0e435befae
ibmvnic: fix NULL pointer dereference in ibmvic_reset_crq
crq->msgs could be NULL if the previous reset did not complete after
freeing crq->msgs. Check for NULL before dereferencing them.
Snippet of call trace:
...
ibmvnic 30000003 env3 (unregistering): Releasing sub-CRQ
ibmvnic 30000003 env3 (unregistering): Releasing CRQ
BUG: Kernel NULL pointer dereference on read at 0x00000000
Faulting instruction address: 0xc0000000000c1a30
Oops: Kernel access of bad area, sig: 11 [#1]
LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries
Modules linked in: ibmvnic(E-) rpadlpar_io rpaphp xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 nft_compat nft_counter nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables xsk_diag tcp_diag udp_diag tun raw_diag inet_diag unix_diag bridge af_packet_diag netlink_diag stp llc rfkill sunrpc pseries_rng xts vmx_crypto uio_pdrv_genirq uio binfmt_misc ip_tables xfs libcrc32c sd_mod t10_pi sg ibmvscsi ibmveth scsi_transport_srp dm_mirror dm_region_hash dm_log dm_mod [last unloaded: ibmvnic]
CPU: 20 PID: 8426 Comm: kworker/20:0 Tainted: G E 5.10.0-rc1+ #12
Workqueue: events __ibmvnic_reset [ibmvnic]
NIP: c0000000000c1a30 LR: c008000001b00c18 CTR: 0000000000000400
REGS: c00000000d05b7a0 TRAP: 0380 Tainted: G E (5.10.0-rc1+)
MSR: 800000000280b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE> CR: 44002480 XER: 20040000
CFAR: c0000000000c19ec IRQMASK: 0
GPR00: 0000000000000400 c00000000d05ba30 c008000001b17c00 0000000000000000
GPR04: 0000000000000000 0000000000000000 0000000000000000 00000000000001e2
GPR08: 000000000001f400 ffffffffffffd950 0000000000000000 c008000001b0b280
GPR12: c0000000000c19c8 c00000001ec72e00 c00000000019a778 c00000002647b440
GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR20: 0000000000000006 0000000000000001 0000000000000003 0000000000000002
GPR24: 0000000000001000 c008000001b0d570 0000000000000005 c00000007ab5d550
GPR28: c00000007ab5c000 c000000032fcf848 c00000007ab5cc00 c000000032fcf800
NIP [c0000000000c1a30] memset+0x68/0x104
LR [c008000001b00c18] ibmvnic_reset_crq+0x70/0x110 [ibmvnic]
Call Trace:
[c00000000d05ba30] [0000000000000800] 0x800 (unreliable)
[c00000000d05bab0] [c008000001b0a930] do_reset.isra.40+0x224/0x634 [ibmvnic]
[c00000000d05bb80] [c008000001b08574] __ibmvnic_reset+0x17c/0x3c0 [ibmvnic]
[c00000000d05bc50] [c00000000018d9ac] process_one_work+0x2cc/0x800
[c00000000d05bd20] [c00000000018df58] worker_thread+0x78/0x520
[c00000000d05bdb0] [c00000000019a934] kthread+0x1c4/0x1d0
[c00000000d05be20] [c00000000000d5d0] ret_from_kernel_thread+0x5c/0x6c
Fixes: 032c5e8284 ("Driver for IBM System i/p VNIC protocol")
Signed-off-by: Lijun Pan <ljp@linux.ibm.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-11-24 16:28:34 -08:00
..
2020-11-09 18:14:29 +01:00
2020-11-19 14:03:52 +01:00
2020-10-17 15:05:30 -06:00
2020-10-30 14:51:01 -07:00
2020-11-18 16:42:07 -08:00
2020-11-02 18:14:07 +01:00
2020-10-01 16:23:50 +03:00
2020-11-12 13:59:04 -07:00
2020-10-30 16:57:41 -05:00
2020-10-24 10:39:22 -07:00
2020-11-15 10:15:17 -08:00
2020-11-04 17:13:12 -08:00
2020-10-25 14:51:49 -07:00
2020-09-29 17:27:08 +01:00
2020-11-17 13:25:06 +01:00
2020-11-16 13:24:32 +01:00
2020-10-28 11:41:15 -06:00
2020-10-19 14:28:30 -07:00
2020-10-28 19:12:03 +01:00
2020-10-15 14:43:29 -07:00
2020-10-12 13:26:49 -07:00
2020-11-09 18:35:35 +01:00
2020-11-11 09:53:09 +01:00
2020-11-16 06:36:31 +10:00
2020-10-23 16:16:31 -07:00
2020-11-16 15:02:33 -08:00
2020-11-13 06:46:20 -08:00
2020-10-29 20:10:25 +01:00
2020-11-06 16:02:00 +01:00
2020-10-17 11:01:01 -07:00
2020-10-13 12:12:44 -07:00
2020-10-27 19:03:53 +01:00
2020-10-23 10:54:13 -07:00
2020-11-13 12:25:21 -04:00
2020-11-17 12:00:40 -08:00
2020-10-27 16:01:22 +02:00
2020-11-15 09:49:56 -08:00
2020-11-08 09:52:57 -08:00
2020-10-07 12:02:58 +02:00
2020-10-16 09:28:45 -06:00
2020-10-16 12:21:15 -07:00
2020-10-24 10:39:22 -07:00
2020-10-14 15:05:38 -07:00
2020-10-15 14:43:29 -07:00
2020-10-24 10:39:22 -07:00
2020-10-26 16:57:18 -04:00
2020-10-14 15:56:58 -07:00
2020-11-04 08:56:07 +02:00
2020-11-10 13:58:01 +01:00
2020-10-30 18:24:51 +01:00
2020-11-24 16:28:34 -08:00
2020-11-24 15:00:53 -08:00
2020-10-25 11:12:31 -07:00
2020-10-13 18:38:28 -07:00
2020-11-09 17:39:15 +01:00
2020-11-11 17:10:16 -06:00
2020-10-27 13:21:03 +05:30
2020-10-06 07:07:03 +02:00
2020-11-04 13:55:30 -06:00
2020-10-01 22:30:07 +01:00
2020-10-22 12:41:00 -07:00
2020-11-10 15:35:41 +01:00
2020-10-23 16:16:31 -07:00
2020-10-27 19:23:04 +01:00
2020-10-24 10:33:08 -07:00
2020-11-10 10:02:31 -08:00
2020-10-24 10:33:08 -07:00
2020-10-16 11:11:22 -07:00
2020-11-18 17:59:24 +00:00
2020-10-22 12:56:33 -07:00
2020-10-24 10:39:22 -07:00
2020-10-22 12:58:21 -07:00
2020-10-21 11:22:08 -07:00
2020-11-20 18:59:48 -08:00
2020-11-14 12:19:21 -08:00
2020-10-29 22:13:38 +01:00
2020-10-01 22:59:55 +02:00
2020-11-17 17:08:39 +00:00
2020-11-03 13:14:14 -08:00
2020-10-29 17:22:59 -05:00
2020-11-13 13:44:05 +01:00
2020-11-12 12:30:29 +01:00
2020-11-06 16:39:11 +03:00
2020-11-08 11:28:08 -08:00
2020-11-09 18:54:30 +01:00
2020-11-13 15:26:49 +01:00
2020-11-16 14:58:23 -08:00
2020-11-03 11:07:40 -07:00
2020-11-15 17:30:55 -05:00
2020-11-09 08:17:46 +01:00
2020-11-09 18:20:36 +01:00
2020-10-23 11:00:57 -07:00
2020-10-05 14:49:24 +02:00
2020-10-24 10:33:08 -07:00
2020-11-02 10:10:39 -05:00