Re: potential race condition on wait_on_page?

Steve Dodd (steved@loth.demon.co.uk)
Wed, 12 Apr 2000 20:36:06 +0100


On Wed, Apr 12, 2000 at 11:02:27AM -0700, ying@almaden.ibm.com wrote:

> Based on my browsing through the kernel code, it appears that the
> page->wait queue is not protected by any spinlocks. This means that
> multiple processes running on SMP can simultaneously call "wait_on_page".
> If the page is locked already, those processes would all be
> put into the wait queue. Without a spinlock to protect the page wait queue
> access, the queue can be messed up. Is this correct? Am I missing
> anything here?

Err, the spinlock that add_wait_queue() takes?

-- 
Ah, but you're forgetting Rimmer directive 273 which states just as
clearly, "No chance you metal bastard!"

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