diff options
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/netfilter/ip6_tables.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index 710238f58aa9..e080fbbbc0e5 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c | |||
@@ -1241,8 +1241,10 @@ __do_replace(struct net *net, const char *name, unsigned int valid_hooks, | |||
1241 | 1241 | ||
1242 | xt_free_table_info(oldinfo); | 1242 | xt_free_table_info(oldinfo); |
1243 | if (copy_to_user(counters_ptr, counters, | 1243 | if (copy_to_user(counters_ptr, counters, |
1244 | sizeof(struct xt_counters) * num_counters) != 0) | 1244 | sizeof(struct xt_counters) * num_counters) != 0) { |
1245 | ret = -EFAULT; | 1245 | /* Silent error, can't fail, new table is already in place */ |
1246 | net_warn_ratelimited("ip6tables: counters copy to user failed while replacing table\n"); | ||
1247 | } | ||
1246 | vfree(counters); | 1248 | vfree(counters); |
1247 | xt_table_unlock(t); | 1249 | xt_table_unlock(t); |
1248 | return ret; | 1250 | return ret; |