mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 06:10:56 +00:00
rds: add missing barrier to release_refill
commit 9f414eb409
upstream.
The functions clear_bit and set_bit do not imply a memory barrier, thus it
may be possible that the waitqueue_active function (which does not take
any locks) is moved before clear_bit and it could miss a wakeup event.
Fix this bug by adding a memory barrier after clear_bit.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7bb985e572
commit
373ecb1875
1 changed files with 1 additions and 0 deletions
|
@ -356,6 +356,7 @@ static int acquire_refill(struct rds_connection *conn)
|
|||
static void release_refill(struct rds_connection *conn)
|
||||
{
|
||||
clear_bit(RDS_RECV_REFILL, &conn->c_flags);
|
||||
smp_mb__after_atomic();
|
||||
|
||||
/* We don't use wait_on_bit()/wake_up_bit() because our waking is in a
|
||||
* hot path and finding waiters is very rare. We don't want to walk
|
||||
|
|
Loading…
Reference in a new issue