public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
To: "David S. Miller" <davem@redhat.com>
Cc: Serge Kuznetsov <sk@deeptown.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] arp: fix seq_file handling bug
Date: Sat, 30 Nov 2002 13:36:00 -0200	[thread overview]
Message-ID: <20021130153600.GF30931@conectiva.com.br> (raw)

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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other threads:[~2002-11-30 15:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-30 15:36 Arnaldo Carvalho de Melo [this message]
2002-12-02  7:41 ` [PATCH] arp: fix seq_file handling bug David S. Miller
2002-12-02 11:29   ` Arnaldo Carvalho de Melo

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=20021130153600.GF30931@conectiva.com.br \
    --to=acme@conectiva.com.br \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sk@deeptown.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox