Xin Long
06a80feb3f
tipc: add NULL pointer check before calling kfree_rcu
...
[ Upstream commit 42dec1dbe38239cf91cc1f4df7830c66276ced37 ]
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-09-21 07:14:03 +02:00
..
2018-10-03 17:01:42 -07:00
2019-08-04 09:33:28 +02:00
2019-05-16 19:43:46 +02:00
2019-04-20 09:07:53 +02:00
2019-04-27 09:34:40 +02:00
2019-06-22 08:17:21 +02:00
2019-09-16 08:19:33 +02:00
2019-08-04 09:33:32 +02:00
2019-09-21 07:14:01 +02:00
2019-05-08 07:19:07 +02:00
2019-07-10 09:55:33 +02:00
2019-08-11 12:22:15 +02:00
2019-09-21 07:14:02 +02:00
2018-09-19 22:47:15 +02:00
2019-04-03 06:24:14 +02:00
2018-02-25 11:05:44 +01:00
2018-07-22 14:27:39 +02:00
2019-02-12 19:45:00 +01:00
2017-02-18 15:11:43 +01:00
2019-03-19 13:14:08 +01:00
2019-05-02 09:32:06 +02:00
2019-09-21 07:14:03 +02:00
2019-09-21 07:14:01 +02:00
2017-05-25 15:44:41 +02:00
2018-09-15 09:43:01 +02:00
2018-03-31 18:11:34 +02:00
2019-04-17 08:36:44 +02:00
2019-09-16 08:19:32 +02:00
2019-08-11 12:22:17 +02:00
2016-09-10 23:12:53 -07:00
2019-06-22 08:17:22 +02:00
2019-06-11 12:22:33 +02:00
2019-09-06 10:19:52 +02:00
2018-09-09 20:01:19 +02:00
2018-03-11 16:21:34 +01:00
2016-10-20 11:23:08 -04:00
2019-08-25 10:51:51 +02:00
2019-03-13 14:04:53 -07:00
2018-08-09 12:17:59 +02:00
2019-08-04 09:33:35 +02:00
2019-08-04 09:33:34 +02:00
2019-08-04 09:33:33 +02:00
2019-08-25 10:51:51 +02:00
2019-03-23 13:19:44 +01:00
2018-08-24 13:12:36 +02:00
2019-06-11 12:22:46 +02:00
2018-05-16 10:08:43 +02:00
2019-04-03 06:24:14 +02:00
2019-08-04 09:33:34 +02:00
2019-09-21 07:14:02 +02:00
2019-09-21 07:14:03 +02:00
2018-04-29 11:32:02 +02:00
2019-07-21 09:05:57 +02:00
2016-10-19 10:58:04 -04:00
2019-09-21 07:14:03 +02:00
2019-03-19 13:14:10 +01:00
2019-05-25 18:26:44 +02:00
2019-09-06 10:19:52 +02:00
2019-03-19 13:14:09 +01:00
2019-09-16 08:19:32 +02:00
2019-01-09 16:16:41 +01:00
2019-08-25 10:51:40 +02:00
2016-10-06 09:52:23 -07:00