Files
kernel/include/linux
Sabrina Dubroca e783bb00ad ipmr: fix error path when ipmr_new_table fails
commit 0bbbf0e7d0 ("ipmr, ip6mr: Unite creation of new mr_table")
refactored ipmr_new_table, so that it now returns NULL when
mr_table_alloc fails. Unfortunately, all callers of ipmr_new_table
expect an ERR_PTR.

This can result in NULL deref, for example when ipmr_rules_exit calls
ipmr_free_table with NULL net->ipv4.mrt in the
!CONFIG_IP_MROUTE_MULTIPLE_TABLES version.

This patch makes mr_table_alloc return errors, and changes
ip6mr_new_table and its callers to return/expect error pointers as
well. It also removes the version of mr_table_alloc defined under
!CONFIG_IP_MROUTE_COMMON, since it is never used.

Fixes: 0bbbf0e7d0 ("ipmr, ip6mr: Unite creation of new mr_table")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-05 12:26:41 -04:00
..
2018-05-31 15:35:38 -04:00
2018-06-05 10:48:09 -04:00
2018-04-20 17:18:35 -07:00
2018-05-09 17:25:13 +02:00
2018-04-26 09:02:01 -06:00
2018-04-11 10:28:35 -07:00
2018-04-11 10:28:38 -07:00
2018-04-12 09:41:19 -07:00
2018-06-05 08:50:16 -04:00
2018-04-11 10:28:32 -07:00
2018-04-11 10:28:39 -07:00
2018-05-11 17:28:45 -07:00
2018-05-11 17:28:45 -07:00
2018-04-05 21:36:24 -07:00
2018-04-05 21:36:27 -07:00
2018-05-03 15:55:23 -07:00
2018-05-18 11:40:27 -04:00
2018-04-26 15:08:04 -04:00