Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1379156 > unrolled thread
| Started by | Santosh Shilimkar <santosh.shilimkar@oracle.com> |
|---|---|
| First post | 2016-04-14 19:50 +0200 |
| Last post | 2016-04-14 19:50 +0200 |
| Articles | 2 — 1 participant |
Back to article view | Back to linux.kernel
[net][PATCH v2 0/2] RDS: couple of fixes for 4.6 Santosh Shilimkar <santosh.shilimkar@oracle.com> - 2016-04-14 19:50 +0200
[net][PATCH v2 2/2] RDS: Fix the atomicity for congestion map update Santosh Shilimkar <santosh.shilimkar@oracle.com> - 2016-04-14 19:50 +0200
| From | Santosh Shilimkar <santosh.shilimkar@oracle.com> |
|---|---|
| Date | 2016-04-14 19:50 +0200 |
| Subject | [net][PATCH v2 0/2] RDS: couple of fixes for 4.6 |
| Message-ID | <rnTyW-5JF-13@gated-at.bofh.it> |
v2:
Rebased fixes against 'net' instead of 'net-next' Patches are also
available at below git tree.
The following changes since commit e013b7780c41b471c4269ac9ccafb65ba7c9ec86:
Merge branch 'dsa-voidify-ops' (2016-04-08 16:51:15 -0400)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux.git for_4.6/net/rds-fixes
for you to fetch changes up to e9155afb1902380938ca83ba8504aaa2d7ee5210:
RDS: Fix the atomicity for congestion map update (2016-04-08 15:08:13 -0700)
----------------------------------------------------------------
Qing Huang (1):
RDS: fix endianness for dp_ack_seq
Santosh Shilimkar (1):
RDS: Fix the atomicity for congestion map update
net/rds/cong.c | 4 ++--
net/rds/ib_cm.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
Regards,
Santosh
[toc] | [next] | [standalone]
| From | Santosh Shilimkar <santosh.shilimkar@oracle.com> |
|---|---|
| Date | 2016-04-14 19:50 +0200 |
| Subject | [net][PATCH v2 2/2] RDS: Fix the atomicity for congestion map update |
| Message-ID | <rnTyX-5JF-29@gated-at.bofh.it> |
| In reply to | #1379156 |
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. Reviewed-by: Leon Romanovsky <leon@leon.nu> Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> --- net/rds/cong.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/rds/cong.c b/net/rds/cong.c index e6144b8..6641bcf 100644 --- a/net/rds/cong.c +++ b/net/rds/cong.c @@ -299,7 +299,7 @@ void rds_cong_set_bit(struct rds_cong_map *map, __be16 port) i = be16_to_cpu(port) / RDS_CONG_MAP_PAGE_BITS; off = be16_to_cpu(port) % RDS_CONG_MAP_PAGE_BITS; - __set_bit_le(off, (void *)map->m_page_addrs[i]); + set_bit_le(off, (void *)map->m_page_addrs[i]); } void rds_cong_clear_bit(struct rds_cong_map *map, __be16 port) @@ -313,7 +313,7 @@ void rds_cong_clear_bit(struct rds_cong_map *map, __be16 port) i = be16_to_cpu(port) / RDS_CONG_MAP_PAGE_BITS; off = be16_to_cpu(port) % RDS_CONG_MAP_PAGE_BITS; - __clear_bit_le(off, (void *)map->m_page_addrs[i]); + clear_bit_le(off, (void *)map->m_page_addrs[i]); } static int rds_cong_test_bit(struct rds_cong_map *map, __be16 port) -- 1.9.1
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web