aboutsummaryrefslogtreecommitdiffstats
path: root/net/packet
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-12-16 14:04:02 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-28 14:58:19 -0800
commit1bf40954cf232a043a49623cf251f787c1871e64 (patch)
tree86b6a26e04f102091e6df0d59c6ad85cd5e5ff5e /net/packet
parent2d4d29802ff76de5af6123ef26c24ab512181223 (diff)
downloadkernel_samsung_smdk4412-1bf40954cf232a043a49623cf251f787c1871e64.zip
kernel_samsung_smdk4412-1bf40954cf232a043a49623cf251f787c1871e64.tar.gz
kernel_samsung_smdk4412-1bf40954cf232a043a49623cf251f787c1871e64.tar.bz2
[PACKET]: Fix /proc/net/packet crash due to bogus private pointer
The seq_open_net patch changed the meaning of seq->private. Unfortunately it missed two spots in AF_PACKET, which still used the old way of dereferencing seq->private, thus causing weird and wonderful crashes when reading /proc/net/packet. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/packet')
-rw-r--r--net/packet/af_packet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 485af56..43e49f4 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1878,7 +1878,7 @@ static void *packet_seq_start(struct seq_file *seq, loff_t *pos)
static void *packet_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{
- struct net *net = seq->private;
+ struct net *net = seq_file_net(seq);
++*pos;
return (v == SEQ_START_TOKEN)
? sk_head(&net->packet.sklist)
@@ -1887,7 +1887,7 @@ static void *packet_seq_next(struct seq_file *seq, void *v, loff_t *pos)
static void packet_seq_stop(struct seq_file *seq, void *v)
{
- struct net *net = seq->private;
+ struct net *net = seq_file_net(seq);
read_unlock(&net->packet.sklist_lock);
}