View | Details | Raw Unified | Return to bug 989176
Collapse All | Expand All

(-)a/net/ipv4/netfilter/arp_tables.c (-1 / +7 lines)
Lines 366-373 static bool find_jump_target(const struct xt_table_info *t, Link Here
366
			     const struct arpt_entry *target)
366
			     const struct arpt_entry *target)
367
{
367
{
368
	struct arpt_entry *iter;
368
	struct arpt_entry *iter;
369
	void *loc_cpu_entry = t->entries[raw_smp_processor_id()];
369
370
370
	xt_entry_foreach(iter, t->entries, t->size) {
371
	xt_entry_foreach(iter, loc_cpu_entry, t->size) {
371
		 if (iter == target)
372
		 if (iter == target)
372
			return true;
373
			return true;
373
	}
374
	}
Lines 1358-1363 static int translate_compat_table(struct xt_table_info **pinfo, Link Here
1358
	if (ret)
1359
	if (ret)
1359
		goto free_newinfo;
1360
		goto free_newinfo;
1360
1361
1362
	/* And one copy for every other CPU */
1363
	for_each_possible_cpu(i)
1364
		if (newinfo->entries[i] && newinfo->entries[i] != entry1)
1365
			memcpy(newinfo->entries[i], entry1, newinfo->size);
1366
1361
	*pinfo = newinfo;
1367
	*pinfo = newinfo;
1362
	*pentry0 = entry1;
1368
	*pentry0 = entry1;
1363
	xt_free_table_info(info);
1369
	xt_free_table_info(info);
(-)a/net/ipv4/netfilter/ip_tables.c (-3 / +8 lines)
Lines 442-449 static bool find_jump_target(const struct xt_table_info *t, Link Here
442
			     const struct ipt_entry *target)
442
			     const struct ipt_entry *target)
443
{
443
{
444
	struct ipt_entry *iter;
444
	struct ipt_entry *iter;
445
	void *loc_cpu_entry = t->entries[raw_smp_processor_id()];
445
446
446
	xt_entry_foreach(iter, t->entries, t->size) {
447
	xt_entry_foreach(iter, loc_cpu_entry, t->size) {
447
		 if (iter == target)
448
		 if (iter == target)
448
			return true;
449
			return true;
449
	}
450
	}
Lines 1479-1486 check_compat_entry_size_and_hooks(struct compat_ipt_entry *e, Link Here
1479
	entry_offset = (void *)e - (void *)base;
1480
	entry_offset = (void *)e - (void *)base;
1480
	j = 0;
1481
	j = 0;
1481
	xt_ematch_foreach(ematch, e) {
1482
	xt_ematch_foreach(ematch, e) {
1482
		ret = compat_find_calc_match(ematch, &e->ip, e->comefrom,
1483
		ret = compat_find_calc_match(ematch, &e->ip, e->comefrom, &off);
1483
					     &off);
1484
		if (ret != 0)
1484
		if (ret != 0)
1485
			goto release_matches;
1485
			goto release_matches;
1486
		++j;
1486
		++j;
Lines 1635-1640 translate_compat_table(struct net *net, Link Here
1635
	if (ret)
1635
	if (ret)
1636
		goto free_newinfo;
1636
		goto free_newinfo;
1637
1637
1638
	/* And one copy for every other CPU */
1639
	for_each_possible_cpu(i)
1640
		if (newinfo->entries[i] && newinfo->entries[i] != entry1)
1641
			memcpy(newinfo->entries[i], entry1, newinfo->size);
1642
1638
	*pinfo = newinfo;
1643
	*pinfo = newinfo;
1639
	*pentry0 = entry1;
1644
	*pentry0 = entry1;
1640
	xt_free_table_info(info);
1645
	xt_free_table_info(info);
(-)a/net/ipv6/netfilter/ip6_tables.c (-4 / +9 lines)
Lines 455-462 static bool find_jump_target(const struct xt_table_info *t, Link Here
455
			     const struct ip6t_entry *target)
455
			     const struct ip6t_entry *target)
456
{
456
{
457
	struct ip6t_entry *iter;
457
	struct ip6t_entry *iter;
458
	void *loc_cpu_entry = t->entries[raw_smp_processor_id()];
458
459
459
	xt_entry_foreach(iter, t->entries, t->size) {
460
	xt_entry_foreach(iter, loc_cpu_entry, t->size) {
460
		 if (iter == target)
461
		 if (iter == target)
461
			return true;
462
			return true;
462
	}
463
	}
Lines 1493-1500 check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e, Link Here
1493
	entry_offset = (void *)e - (void *)base;
1494
	entry_offset = (void *)e - (void *)base;
1494
	j = 0;
1495
	j = 0;
1495
	xt_ematch_foreach(ematch, e) {
1496
	xt_ematch_foreach(ematch, e) {
1496
		ret = compat_find_calc_match(ematch, &e->ipv6, e->comefrom,
1497
		ret = compat_find_calc_match(ematch,
1497
					     &off);
1498
					     &e->ipv6, e->comefrom, &off);
1498
		if (ret != 0)
1499
		if (ret != 0)
1499
			goto release_matches;
1500
			goto release_matches;
1500
		++j;
1501
		++j;
Lines 1640-1645 translate_compat_table(struct net *net, Link Here
1640
	if (ret)
1641
	if (ret)
1641
		goto free_newinfo;
1642
		goto free_newinfo;
1642
1643
1644
	/* And one copy for every other CPU */
1645
	for_each_possible_cpu(i)
1646
		if (newinfo->entries[i] && newinfo->entries[i] != entry1)
1647
			memcpy(newinfo->entries[i], entry1, newinfo->size);
1648
1643
	*pinfo = newinfo;
1649
	*pinfo = newinfo;
1644
	*pentry0 = entry1;
1650
	*pentry0 = entry1;
1645
	xt_free_table_info(info);
1651
	xt_free_table_info(info);
1646
- 

Return to bug 989176