All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Oester <kernel@linuxace.com>
To: netfilter-devel@lists.netfilter.org
Subject: [PATCH] ipt_dstlimit spinlock fixup
Date: Sun, 22 Aug 2004 08:33:48 -0700	[thread overview]
Message-ID: <20040822153348.GA20301@linuxace.com> (raw)

Since ipt_dstlimit makes use of MUST_BE_LOCKED macro, compiling
without CONFIG_NETFILTER_DEBUG causes errors.  Fix below.

Similar patch posted by Samir Bellabes a few days ago, but this one
removes an unneeded #ifdef pair

This fixes bugzilla #225

Phil


diff -ru pom-orig/dstlimit/linux-2.6/net/ipv4/netfilter/ipt_dstlimit.c pom-new/dstlimit/linux-2.6/net/ipv4/netfilter/ipt_dstlimit.c
--- pom-orig/dstlimit/linux-2.6/net/ipv4/netfilter/ipt_dstlimit.c       2004-02-22 19:15:45.000000000 -0500
+++ pom-new/dstlimit/linux-2.6/net/ipv4/netfilter/ipt_dstlimit.c        2004-08-22 11:30:10.156485400 -0400
@@ -83,7 +83,11 @@
        struct dstlimit_cfg cfg;        /* config */
 
        /* used internally */
+#ifdef CONFIG_NETFILTER_DEBUG
+       struct spinlock_debug lock;     /* lock for list_head */
+#else
        spinlock_t lock;                /* lock for list_head */
+#endif
        u_int32_t rnd;                  /* random seed for hash */
        struct timer_list timer;        /* timer for gc */
        atomic_t count;                 /* number entries in table */
@@ -212,7 +216,11 @@
        atomic_set(&hinfo->count, 0);
        atomic_set(&hinfo->use, 1);
        hinfo->rnd = 0;
+#ifdef CONFIG_NETFILTER_DEBUG
+       hinfo->lock.l = SPIN_LOCK_UNLOCKED;
+#else
        hinfo->lock = SPIN_LOCK_UNLOCKED;
+#endif
        hinfo->pde = create_proc_entry(minfo->name, 0, dstlimit_procdir);
        if (!hinfo->pde) {
                vfree(hinfo);

             reply	other threads:[~2004-08-22 15:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-22 15:33 Phil Oester [this message]
2004-08-23 18:47 ` [PATCH] ipt_dstlimit spinlock fixup Patrick McHardy
2004-08-23 20:12   ` Phil Oester
2004-08-23 20:49     ` Patrick McHardy

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=20040822153348.GA20301@linuxace.com \
    --to=kernel@linuxace.com \
    --cc=netfilter-devel@lists.netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.