Re: [CFT][PATCH] large /proc/mounts and friends

Keith Owens (kaos@ocs.com.au)
Tue, 16 Oct 2001 15:16:40 +1000


On Mon, 15 Oct 2001 21:41:49 -0700 (PDT),
Linus Torvalds <torvalds@transmeta.com> wrote:
> s_seek()
> {
> struct mod_sym *v = p;
> int mod_nr = pos >> 32;
> while (mod_nr && v->mod) {
> mod_nr--;
> v->mod = v->mod->next;
> };
> }

If a module is deleted between calls to s_seek() and that deletion is
before mod_nr then the caller has seen the deleted module but a later
module will transiently disappear. I don't see how counting on a
linked list which is subject to deletion at any point can deliver
reliable results. Seeing the old module is wrong but acceptable. Not
seeing a module that still exists is wrong.

-
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/