mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Andreas Herrmann" <AHERRMAN@de.ibm.com>
To: linux-kernel@vger.kernel.org
Subject: Patch: netfilter ipv6
Date: Thu, 21 Feb 2002 16:26:41 +0100	[thread overview]
Message-ID: <OF56179CF1.BE50D71D-ONC1256B67.004B342F@de.ibm.com> (raw)

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



             reply	other threads:[~2002-02-21 15:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-21 15:26 Andreas Herrmann [this message]
2002-02-21 19:29 ` Harald Welte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OF56179CF1.BE50D71D-ONC1256B67.004B342F@de.ibm.com \
    --to=aherrman@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®