mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "YOSHIFUJI Hideaki / 吉藤英明" <yoshfuji@linux-ipv6.org>
To: sebek64@post.cz, oford@arghblech.com, smiler@lanil.mine.nu,
	jmorris@intercode.com.au
Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com,
	yoshfuji@linux-ipv6.org
Subject: Re: [OOPS] less /proc/net/igmp
Date: Wed, 27 Aug 2003 01:54:48 +0900 (JST)	[thread overview]
Message-ID: <20030827.015448.70287953.yoshfuji@linux-ipv6.org> (raw)
In-Reply-To: <20030826.173226.114994096.yoshfuji@linux-ipv6.org>

Hello.

In article <20030826.173226.114994096.yoshfuji@linux-ipv6.org> (at Tue, 26 Aug 2003 17:32:26 +0900 (JST)), YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org> says:

> > I can confirm. I have it with 2.6.0-test4.
> > 
> > Let me know what useful info I can provide.  The oops is the same.
> 
> Okay, everyone. I'll try to fix this.

Please try this patch.

Index: linux-2.6/net/ipv4/igmp.c
===================================================================
RCS file: /home/cvs/linux-2.5/net/ipv4/igmp.c,v
retrieving revision 1.33
diff -u -r1.33 igmp.c
--- linux-2.6/net/ipv4/igmp.c	21 Aug 2003 17:47:23 -0000	1.33
+++ linux-2.6/net/ipv4/igmp.c	26 Aug 2003 15:18:03 -0000
@@ -2122,6 +2122,7 @@
 			break;
 		}
 		read_unlock(&in_dev->lock);
+		in_dev_put(in_dev);
 	}
 	return im;
 }
@@ -2181,7 +2182,9 @@
 	if (likely(state->in_dev != NULL)) {
 		read_unlock(&state->in_dev->lock);
 		in_dev_put(state->in_dev);
+		state->in_dev = NULL;
 	}
+	state->dev = NULL;
 	read_unlock(&dev_base_lock);
 }
 
@@ -2284,6 +2287,7 @@
 			spin_unlock_bh(&im->lock);
 		}
 		read_unlock_bh(&idev->lock);
+		in_dev_put(idev);
 	}
 	return psf;
 }
@@ -2350,12 +2354,16 @@
 static void igmp_mcf_seq_stop(struct seq_file *seq, void *v)
 {
 	struct igmp_mcf_iter_state *state = igmp_mcf_seq_private(seq);
-	if (likely(state->im != NULL))
+	if (likely(state->im != NULL)) {
 		spin_unlock_bh(&state->im->lock);
+		state->im = NULL;
+	}
 	if (likely(state->idev != NULL)) {
 		read_unlock_bh(&state->idev->lock);
 		in_dev_put(state->idev);
+		state->idev = NULL;
 	}
+	state->dev = NULL;
 	read_unlock(&dev_base_lock);
 }
 
Index: linux-2.6/net/ipv6/mcast.c
===================================================================
RCS file: /home/cvs/linux-2.5/net/ipv6/mcast.c,v
retrieving revision 1.30
diff -u -r1.30 mcast.c
--- linux-2.6/net/ipv6/mcast.c	21 Aug 2003 23:44:54 -0000	1.30
+++ linux-2.6/net/ipv6/mcast.c	26 Aug 2003 15:18:03 -0000
@@ -2078,6 +2078,7 @@
 			break;
 		}
 		read_unlock_bh(&idev->lock);
+		in6_dev_put(idev);
 	}
 	return im;
 }
@@ -2135,7 +2136,9 @@
 	if (likely(state->idev != NULL)) {
 		read_unlock_bh(&state->idev->lock);
 		in6_dev_put(state->idev);
+		state->idev = NULL;
 	}
+	state->dev = NULL;
 	read_unlock(&dev_base_lock);
 }
 
@@ -2225,6 +2228,7 @@
 			spin_unlock_bh(&im->mca_lock);
 		}
 		read_unlock_bh(&idev->lock);
+		in6_dev_put(idev);
 	}
 	return psf;
 }
@@ -2291,12 +2295,16 @@
 static void igmp6_mcf_seq_stop(struct seq_file *seq, void *v)
 {
 	struct igmp6_mcf_iter_state *state = igmp6_mcf_seq_private(seq);
-	if (likely(state->im != NULL))
+	if (likely(state->im != NULL)) {
 		spin_unlock_bh(&state->im->mca_lock);
+		state->im = NULL;
+	}
 	if (likely(state->idev != NULL)) {
 		read_unlock_bh(&state->idev->lock);
 		in6_dev_put(state->idev);
+		state->idev = NULL;
 	}
+	state->dev = NULL;
 	read_unlock(&dev_base_lock);
 }
 


-- 
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA

  reply	other threads:[~2003-08-26 16:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-25 16:32 Marcel Sebek
2003-08-25 16:44 ` Nagendra Singh Tomar
2003-08-26  6:03 ` YOSHIFUJI Hideaki / 吉藤英明
2003-08-26  6:23   ` Owen Ford
2003-08-26  8:32     ` YOSHIFUJI Hideaki / 吉藤英明
2003-08-26 16:54       ` YOSHIFUJI Hideaki / 吉藤英明 [this message]
2003-08-26 17:24         ` Matt Gibson
2003-08-26 20:18         ` Owen Ford
2003-08-26 10:29   ` James Morris
2003-08-26  6:41 ` Christian Axelsson
2003-08-26  7:10   ` Owen Ford

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=20030827.015448.70287953.yoshfuji@linux-ipv6.org \
    --to=yoshfuji@linux-ipv6.org \
    --cc=jmorris@intercode.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    --cc=oford@arghblech.com \
    --cc=sebek64@post.cz \
    --cc=smiler@lanil.mine.nu \
    /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®