archive mirror
 help / color / mirror / Atom feed
From: "James McMechan" <>
To: <>
Subject: Re: Oops with tmpfs on both 2.4.22 & 2.6.0-test11
Date: Sun, 7 Dec 2003 14:48:57 -0800	[thread overview]
Message-ID: <> (raw)

After tinkering with patches for the last week I finally have a version
that does not look quite so bad, my first attempts at improvement were
awful in their awkwardness.
The problem was that the cursor was in the list being walked, and when
the pointer pointed to the cursor the list_del/list_add_tail pair would
oops trying to find the entry pointed to by the prev pointer of the
deleted cursor element.

The solution I finally found was to move the list_del earlier, before
begining of the list walk, since it is not used during the list walk and
should not count in the list enumeration it can be deleted, then the
pointer cannot point to it so it can be added safely with the
without oopsing, and everything works as expected I am unable to oops
version with any of my test programs.

And of course since this Oops both 2.4 & 2.6 I will need to prepare
a second set for the 2.4 tree.

My question to you who expressed interest, is anything odd looking about
this code, anything that I am doing wrong or could do better?

diff -Nur linux-2.6.0-test11/fs/libfs.c
--- linux-2.6.0-test11/fs/libfs.c 2003-11-26 12:42:48.000000000 -0800
+++ build-2.6.0-test11-bug/fs/libfs.c 2003-12-07
13:07:19.000000000 -0800
@@ -79,6 +79,7 @@
    loff_t n = file->f_pos - 2;

+   list_del(&cursor->d_child);
    p = file->f_dentry->;
    while (n && p != &file->f_dentry->d_subdirs) {
     struct dentry *next;
@@ -87,7 +88,6 @@
     p = p->next;
-   list_del(&cursor->d_child);
    list_add_tail(&cursor->d_child, p);

             reply	other threads:[~2003-12-07 22:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-07 22:48 James McMechan [this message]
     [not found] <>
2003-12-08  5:10 ` Oops with tmpfs on both 2.4.22 & 2.6.0-test11 Maneesh Soni
  -- strict thread matches above, loose matches on Subject: below --
2003-12-03 11:06 James W McMechan
2003-12-03 12:02 ` Maneesh Soni
2003-12-01  2:59 James W McMechan
2003-12-01 11:37 ` Maneesh Soni
2003-12-01  2:06 James W McMechan
2003-12-01  4:51 ` William Lee Irwin III
2003-12-01  1:06 James W McMechan
2003-12-01  3:43 ` William Lee Irwin III
2003-11-30 21:17 James W McMechan
2003-12-01  1:21 ` William Lee Irwin III
2003-12-01  7:58   ` Andries Brouwer
2003-12-01  8:00     ` William Lee Irwin III
2003-11-30 17:34 James W McMechan
2003-11-30 20:06 ` William Lee Irwin III
2003-11-30 21:21   ` Oleg Drokin
2003-11-30 16:57 James W McMechan
2003-11-30 19:27 ` William Lee Irwin III

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* 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;
as well as URLs for NNTP newsgroup(s).