Xin Long
42dec1dbe3
tipc: add NULL pointer check before calling kfree_rcu
...
Unlike kfree(p), kfree_rcu(p, rcu) won't do NULL pointer check. When
tipc_nametbl_remove_publ returns NULL, the panic below happens:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000068
RIP: 0010:__call_rcu+0x1d/0x290
Call Trace:
<IRQ>
tipc_publ_notify+0xa9/0x170 [tipc]
tipc_node_write_unlock+0x8d/0x100 [tipc]
tipc_node_link_down+0xae/0x1d0 [tipc]
tipc_node_check_dest+0x3ea/0x8f0 [tipc]
? tipc_disc_rcv+0x2c7/0x430 [tipc]
tipc_disc_rcv+0x2c7/0x430 [tipc]
? tipc_rcv+0x6bb/0xf20 [tipc]
tipc_rcv+0x6bb/0xf20 [tipc]
? ip_route_input_slow+0x9cf/0xb10
tipc_udp_recv+0x195/0x1e0 [tipc]
? tipc_udp_is_known_peer+0x80/0x80 [tipc]
udp_queue_rcv_skb+0x180/0x460
udp_unicast_rcv_skb.isra.56+0x75/0x90
__udp4_lib_rcv+0x4ce/0xb90
ip_local_deliver_finish+0x11c/0x210
ip_local_deliver+0x6b/0xe0
? ip_rcv_finish+0xa9/0x410
ip_rcv+0x273/0x362
Fixes: 97ede29e80ee ("tipc: convert name table read-write lock to RCU")
Reported-by: Li Shuang <shuali@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-09-05 09:58:49 +02:00
..
2019-07-06 12:50:01 +02:00
2019-07-12 17:31:19 -07:00
2019-06-19 17:09:55 +02:00
2019-06-22 08:59:24 -04:00
2019-06-05 17:37:10 +02:00
2019-05-30 11:26:32 -07:00
2019-06-16 14:22:37 -07:00
2019-08-23 18:20:31 +02:00
2019-09-05 09:02:59 +03:00
2019-05-30 11:29:53 -07:00
2019-07-12 16:03:16 -07:00
2019-09-02 23:19:27 +02:00
2019-05-30 11:29:22 -07:00
2019-07-24 11:19:03 +02:00
2019-08-28 12:33:46 +02:00
2019-08-27 20:52:02 -07:00
2019-05-30 11:29:52 -07:00
2019-07-18 17:08:07 -07:00
2019-05-24 17:36:42 +02:00
2019-07-10 18:43:43 -07:00
2019-08-27 20:31:12 -07:00
2019-06-07 11:00:14 -07:00
2019-07-11 14:37:45 -07:00
2019-08-24 13:46:57 -07:00
2019-05-21 10:50:46 +02:00
2019-08-28 15:56:28 -07:00
2019-09-05 00:31:50 +02:00
2019-07-29 10:26:14 -07:00
2019-06-19 17:09:55 +02:00
2019-07-08 19:48:57 -07:00
2019-07-30 14:42:13 -07:00
2019-06-23 13:24:17 -07:00
2019-06-17 20:20:36 -07:00
2019-06-05 17:36:36 +02:00
2019-08-29 16:40:00 +02:00
2019-05-30 11:26:41 -07:00
2019-08-25 14:34:08 -07:00
2019-08-22 19:27:02 -07:00
2019-09-03 22:55:42 +02:00
2019-05-21 11:28:45 +02:00
2019-06-14 19:50:33 -07:00
2019-07-24 15:49:05 -07:00
2019-07-08 12:46:24 -07:00
2019-06-19 17:09:55 +02:00
2019-08-28 14:53:51 -07:00
2019-08-15 13:59:48 -07:00
2019-06-05 17:37:07 +02:00
2019-08-28 15:53:51 -07:00
2019-06-05 17:36:37 +02:00
2019-08-27 20:56:06 -07:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2019-09-05 00:24:58 +02:00
2019-08-31 18:45:35 -07:00
2019-09-05 00:29:21 +02:00
2019-08-20 12:25:14 -07:00
2019-06-22 08:59:24 -04:00
2019-08-26 15:31:29 -04:00
2019-05-30 11:26:32 -07:00
2019-09-05 09:58:49 +02:00
2019-08-15 12:40:15 -07:00
2019-06-07 11:00:14 -07:00
2019-08-02 17:26:27 -07:00
2019-06-05 17:30:29 +02:00
2019-08-21 10:43:03 +02:00
2019-05-24 17:27:12 +02:00
2019-08-20 16:39:48 +02:00
2019-08-24 14:49:35 -07:00
2019-05-31 15:30:03 -06:00
2019-06-17 13:56:26 -07:00
2019-07-19 10:42:02 -07:00
2019-05-21 10:50:45 +02:00