Re: Oops with tmpfs on both 2.4.22 & 2.6.0-test11

From: James W McMechan (mcmechanjw_at_juno.com)
Date: 12/03/03

  • Next message: Takashi Iwai: "Re: Alsa oops, 2.6.0-test8"
    To: maneesh@in.ibm.com
    Date:	Wed, 3 Dec 2003 03:06:14 -0800
    
    

    > Hi,
    >
    > I hope nobody minds me jumping in this thread. I have been looking
    > at this code for some time and hope I have got the facts correct.
    >
    Thank you, so far it is no longer crashing :)

    > The two list_xxx macros as mentioned (fs/libfs.c:line 137) adjusts
    > the cursor dentry to the beginning of the d_subdirs list needed for
    > (file->f_pos == 2) as there can be additions in the d_subdirs list
    > after the open call and before ->lseek or ->readdir call.
    >
    > The cursor adjustment in dcache_dir_lseek() (fs/libfs.c: line 90)
    > always puts the cursor just before the last looked dentry in the
    > while loop.
    >
    > But it is problematic when we have an empty directory and
    > (file->f_pos == 2)
    > In this case we have the loop counter p pointing to the cursor and
    > doing list_del and list_add_tail of the same list node results in oops.
    >
    This is where I get mildly lost, from what you are saying here I
    would have expected a test on list_empty rather than on
    fpos==2 also this occurs in every file, will starting in a different
    pos in the list cause problems?

    With further testing it also Oops even when the dir is not empty
    I did a "touch /dev/shm/1 /dev/shm/2 /dev/shm/3" to put some
    entries in the dir first and the original still oops at offset 2

    I should do more testing, to see if I can find out what happens
    on non empty dirs, because I was thinking it was due to the
    dir being empty, which now appears not to be true.

    > The following patch takes (file->f_post == 2) as a special case and
    > adjusts the cursor dentry by putting it right at the beginning of the
    > d_subdirs list.
    >
    Also is the new variable dentry needed or just a optimization?
    It looks functionally equivalent, but perhaps it is needed for
    something I am not seeing at the moment.
    >
    > Thanks
    > Maneesh

    ________________________________________________________________
    The best thing to hit the internet in years - Juno SpeedBand!
    Surf the web up to FIVE TIMES FASTER!
    Only $14.95/ month - visit www.juno.com to sign up today!
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Takashi Iwai: "Re: Alsa oops, 2.6.0-test8"

    Relevant Pages

    • Re: PATCH - ext2fs privacy (i.e. secure deletion) patch
      ... stored in multiple folders by simply using multiple hard links. ... > also fail if you tried to add it to a directory which was not empty. ... So unless someone feels that's a bug which needs immediate ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [2.4.x, 2.6 problem] registering of empty /proc/sys dirs leads to leaving pointers to freed memory
      ... (sent to linux-kernel and grsecurity dev) ... Yesterday I got an Oops on somewhat patched 2.4.20 when trying to run ... sysctl_init() in kernel/sysctl.c registers some sysctl tables ... and unregister_proc_tableremoves empty, not used ...
      (Linux-Kernel)
    • Re: [PATCH] IPMI: driver model and sysfs support
      ... > * There are some significant changes to versioning in the ... > a single statement and another where you deleted the empty line ... necessarily ASCII strings? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Oops with tmpfs on both 2.4.22 & 2.6.0-test11
      ... I have a test program which will generate the Oops easily. ... >> Hugh Dickins is highly clueful and generally maintains tmpfs. ... the cursor dentry by putting it right at the beginning of the d_subdirs ...
      (Linux-Kernel)
    • [2.6 patch] aio: remove an unused function
      ... * It keeps running them until the list stays empty. ... static inline void aio_run_all_iocbs(struct kioctx *ctx) ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)