Re: [patch] __lock_sock race condition in 2.3.18*

kuznet@ms2.inr.ac.ru
Mon, 20 Sep 1999 21:51:03 +0400 (MSK DST)


Hello!

> This patch will fix a SMP race condition in __lock_sock. Basically it
> avoids to deadlock in __lock_sock if release_sock is been run after the
> user-count check and the setting (overwriting) of current->state.

sk->lock.users cannot change its value under spin lock,
so that position of the check is not essential.
The patch only adds one redundant jump to the beginning of the loop.

Alexey

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