From: Dennis Koslowski <dkoslowski@astaro.com>
To: "netfilter-devel@lists.netfilter.org"
<netfilter-devel@lists.netfilter.org>
Subject: [PATCH] ipt_dstlimit.c - locking & macros
Date: Tue, 27 Jul 2004 10:15:01 +0200 [thread overview]
Message-ID: <41060F05.6070700@astaro.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
Hello,
The dstlimit code will be not compiled with 2.4.26 because of outdated
locking variable. Here is a quick fix, I hope it will be usefull for
someone else.
Regards
--
Dennis Koslowski <dkoslowski@astaro.com> | Product Development
Astaro AG | http://www.astaro.com | +49-721-490069-0 | Fax -55
[-- Attachment #2: ipt_dstlimit.c.diff --]
[-- Type: text/x-patch, Size: 1103 bytes --]
--- linux-2.4.26/net/ipv4/netfilter/ipt_dstlimit.c.orig 2004-07-26 16:36:30.000000000 +0200
+++ linux-2.4.26/net/ipv4/netfilter/ipt_dstlimit.c 2004-07-27 09:56:18.000000000 +0200
@@ -83,7 +83,7 @@ struct ipt_dstlimit_htable {
struct dstlimit_cfg cfg; /* config */
/* used internally */
- spinlock_t lock; /* lock for list_head */
+ struct spinlock_debug lock; /* lock for list_head */
u_int32_t rnd; /* random seed for hash */
struct timer_list timer; /* timer for gc */
atomic_t count; /* number entries in table */
@@ -179,7 +179,8 @@ static int htable_create(struct ipt_dstl
int i;
unsigned int size;
struct ipt_dstlimit_htable *hinfo;
-
+ DECLARE_LOCK(lock_aux);
+
if (minfo->cfg.size)
size = minfo->cfg.size;
else {
@@ -213,7 +214,8 @@ static int htable_create(struct ipt_dstl
atomic_set(&hinfo->count, 0);
atomic_set(&hinfo->use, 1);
hinfo->rnd = 0;
- hinfo->lock = SPIN_LOCK_UNLOCKED;
+/* hinfo->lock = SPIN_LOCK_UNLOCKED; */
+ hinfo->lock = lock_aux;
hinfo->pde = create_proc_entry(minfo->name, 0, dstlimit_procdir);
if (!hinfo->pde) {
vfree(hinfo);
reply other threads:[~2004-07-27 8:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=41060F05.6070700@astaro.com \
--to=dkoslowski@astaro.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.