]> www.infradead.org Git - users/jedix/linux-maple.git/commit
RDS: Fix the atomicity for congestion map update
authorWengang Wang <wen.gang.wang@oracle.com>
Thu, 7 Apr 2016 07:29:43 +0000 (15:29 +0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 14 Apr 2016 01:35:44 +0000 (18:35 -0700)
commit7406144f537e6ac49a74a45549e20124404c035c
tree774fa27a472da8ed401f0ee46468296ecc1ccfc4
parent24163058321e6725c265dd33be5c6c9f42cb6843
RDS: Fix the atomicity for congestion map update

Orabug: 23022620 (UEK4)
QuickRef: 22118109 (UEK2)

Two different threads with different rds sockets may be in
rds_recv_rcvbuf_delta() via receive path. If their ports
both map to the same word in the congestion map, then
using non-atomic ops to update it could cause the map to
be incorrect. Lets use atomics to avoid such an issue.

Full credit to Wengang <wen.gang.wang@oracle.com> for
finding the issue, analysing it and also pointing out
to offending code with spin lock based fix.

Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
net/rds/cong.c