]> git.neil.brown.name Git - history.git/commit
[PATCH] tmpfs oops fix
authorJames McMechan <james_mcmechan@hotmail.com>
Sun, 7 Dec 2003 13:57:40 +0000 (05:57 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Sun, 7 Dec 2003 13:57:40 +0000 (05:57 -0800)
commit6f781f0c6ab106a5f3938df069eb9f88e4ea8d43
treef4bd64e5a951300426cd215e1d05f71515053827
parent0e3a42cccc7c127e8fd903def5d532ebd82ede5e
[PATCH] tmpfs oops fix

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 found was to move the list_del earlier, before the
beginning 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
list pointer cannot point to it so it can be added safely with the
list_add_tail without oopsing, and everything works as expected.

I am unable to oops this version with any of my test programs.

Patch acked by Al Viro.
fs/libfs.c