Re: [PATCH] [Request for inclusion] Filesystem in Userspace

From: David Woodhouse
Date: Tue Nov 16 2004 - 05:23:56 EST


On Tue, 2004-11-16 at 10:52 +0100, Miklos Szeredi wrote:
> > yes but how do you know the entry is still on the list and valid ?
>
> Because, it's always kept on one of two lists: pending and processing.
> The entry is valid valid because it's "owned" by the caller, it's
> never freed inside request_send().
>
> > you dropped the lock. A normal code pattern is that you then HAVE
> > to revalidate the assumptions which you guard by that lock.
>
> The lock guards the list not the list element which is being removed.

Locking rules like that need to be clearly documented.

--
dwmw2

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/