mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Patch: netfilter ipv6
@ 2002-02-21 15:26 Andreas Herrmann
  2002-02-21 19:29 ` Harald Welte
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Herrmann @ 2002-02-21 15:26 UTC (permalink / raw)
  To: linux-kernel

Hi,

enclosed is a patch (against version 2.4.17
of the kernel) for netfilter module ip6_tables.

On an SMP machine (s390 LPAR 4cpus) a page
fault occured when executing "ip6tables -L".

The exception occured in kernel module
ip6_tables (in function get_counters() in
IP6T_ENTRY_ITERATE()).

I found out that the exception goes
back to the memcpy() call in function
translate_table() of ip6_tables.c,
where for each additional cpu a copy
of the entries is generated.

But the entries were copied to the
wrong place. (due to the SMP_ALIGN macro)
(Bad luck :)

Applying the patch, the page
fault didn't occure anymore.


Regards,

Andreas


--- net/ipv6/netfilter/ip6_tables.c~     Wed Oct 31 00:08:12 2001
+++ net/ipv6/netfilter/ip6_tables.c      Wed Feb 20 17:38:18 2002
@@ -906,7 +906,7 @@

     /* And one copy for every other CPU */
     for (i = 1; i < smp_num_cpus; i++) {
-         memcpy(newinfo->entries + SMP_ALIGN(newinfo->size*i),
+         memcpy(newinfo->entries + SMP_ALIGN(newinfo->size)*i,
                 newinfo->entries,
                 SMP_ALIGN(newinfo->size));
     }


--
Linux for eServer Development
Tel :  +49-7031-16-4640
Notes mail :  Andreas Herrmann/GERMANY/IBM@IBMDE
email :  aherrman@de.ibm.com



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Patch: netfilter ipv6
  2002-02-21 15:26 Patch: netfilter ipv6 Andreas Herrmann
@ 2002-02-21 19:29 ` Harald Welte
  0 siblings, 0 replies; 2+ messages in thread
From: Harald Welte @ 2002-02-21 19:29 UTC (permalink / raw)
  To: Andreas Herrmann; +Cc: linux-kernel

On Thu, Feb 21, 2002 at 04:26:41PM +0100, Andreas Herrmann wrote:
> Hi,
> 
> enclosed is a patch (against version 2.4.17
> of the kernel) for netfilter module ip6_tables.

[..]

Thanks for the bugfix, this is indeed a bug caused by a typo in the original
ip6_tables code.  

I (a linux kernel firewalling maintainer) will forward your bugfix for
inclusion to the stock kernel.

BTW: In case you don't know, the netfilter project has a scoreboard for
contributions.  Your Score will be added to http://www.netfilter.org/scoreboard/

> Regards,
> Andreas

-- 
Live long and prosper
- Harald Welte / laforge@gnumonks.org               http://www.gnumonks.org/
============================================================================
GCS/E/IT d- s-: a-- C+++ UL++++$ P+++ L++++$ E--- W- N++ o? K- w--- O- M+ 
V-- PS++ PE-- Y++ PGP++ t+ 5-- !X !R tv-- b+++ !DI !D G+ e* h--- r++ y+(*)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-02-21 19:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-21 15:26 Patch: netfilter ipv6 Andreas Herrmann
2002-02-21 19:29 ` Harald Welte

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®