* [PATCH] arp: fix seq_file handling bug
@ 2002-11-30 15:36 Arnaldo Carvalho de Melo
2002-12-02 7:41 ` David S. Miller
0 siblings, 1 reply; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2002-11-30 15:36 UTC (permalink / raw)
To: David S. Miller; +Cc: Serge Kuznetsov, Linux Kernel Mailing List
Hi David,
Please pull from:
bk://kernel.bkbits.net/acme/net-2.5
Now there is just this outstanding changeset. Now I have
some time to devote to fixing /proc/net/tcp seq_file handling.
- Arnaldo
You can import this changeset into BK by piping this whole message to:
'| bk receive [path to repository]' or apply the patch as usual.
===================================================================
ChangeSet@1.864, 2002-11-30 13:30:49-02:00, acme@conectiva.com.br
o arp: fix seq_file handling bug
When midnigth commander viewer is invoked it first opens the file, read
4 bytes (probably looking for a magic number), reading only 4 bytes makes
state->is_pneigh not to be set neither the lock is taken, because only
the header is being produced (v = (void *)1), so when arp_seq_stop is
called the lock is dropped without having being taken: b00m
Thanks to Serge Kuznetsov for reporting this to me. Other seq_file
code may have this problem, but by using mc viewer in all of /proc/net
I haven't been able to reproduce this problem with any other file.
arp.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff -Nru a/net/ipv4/arp.c b/net/ipv4/arp.c
--- a/net/ipv4/arp.c Sat Nov 30 13:31:52 2002
+++ b/net/ipv4/arp.c Sat Nov 30 13:31:52 2002
@@ -1282,7 +1282,7 @@
{
struct arp_iter_state* state = seq->private;
- if (!state->is_pneigh)
+ if (!state->is_pneigh && v != (void *)1)
read_unlock_bh(&arp_tbl.lock);
}
===================================================================
This BitKeeper patch contains the following changesets:
1.864
## Wrapped with gzip_uu ##
begin 664 bkpatch432
M'XL(`.G9Z#T``^U6[V_;-A#];/X55Q3HTJV62?V*+<!%UG;8B@QHD*[8AV$(
M*.IL$99$C:25>=`?OZ.\I&D:(%BQ+P-J"Q9`WKU[]\A[\%/XX-`6,ZE:9$_A
M)^-\,5.F0^7U("-EVJBTM'%I#&TL:M/BXM7YHD,_CZ.,T<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 2002-12-02 7:41 ` David S. Miller
2002-12-02 11:29 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 3+ messages in thread
From: David S. Miller @ 2002-12-02 7:41 UTC (permalink / raw)
To: acme; +Cc: sk, linux-kernel
From: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
Date: Sat, 30 Nov 2002 13:36:00 -0200
Please pull from:
bk://kernel.bkbits.net/acme/net-2.5
Pulled, thanks.
Now there is just this outstanding changeset. Now I have
some time to devote to fixing /proc/net/tcp seq_file handling.
Please let me know once you have this fixed, as it is
holding up my net merges :-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arp: fix seq_file handling bug
2002-12-02 7:41 ` David S. Miller
@ 2002-12-02 11:29 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2002-12-02 11:29 UTC (permalink / raw)
To: David S. Miller; +Cc: sk, linux-kernel
Em Sun, Dec 01, 2002 at 11:41:28PM -0800, David S. Miller escreveu:
> From: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
> Now there is just this outstanding changeset. Now I have
> some time to devote to fixing /proc/net/tcp seq_file handling.
> Please let me know once you have this fixed, as it is
> holding up my net merges :-)
I'll do, I was quite busy with Real Life(tm), but I'm back trying
to reproduce this one here at home, but failed to do so, I telnetted
to another machine and the ESTABLISHED connection was correctly shown,
so I'll be testing on a busier machine at the office, not on vmware.
- Arnaldo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-12-02 11:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-30 15:36 [PATCH] arp: fix seq_file handling bug Arnaldo Carvalho de Melo
2002-12-02 7:41 ` David S. Miller
2002-12-02 11:29 ` Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox