diff options
author | santosh.shilimkar@oracle.com | 2015-08-22 15:45:33 -0700 |
---|---|---|
committer | David S. Miller | 2015-08-25 13:35:31 -0700 |
commit | dfcec251d22bab947d10cf37e9ad67085cf7f097 (patch) | |
tree | dd9ef3f30a176b7aebe4dd24f9c73a1ff49939a9 /net/openvswitch/vport-gre.c | |
parent | 1c3be624f40acd6f2bd0f22ade081ac2467e8617 (diff) |
RDS: make sure rds_send_drop_to properly takes the m_rs_lock
rds_send_drop_to() is used during socket tear down to find all the
messages on the socket and flush them . It can race with the
acking code unless it takes the m_rs_lock on each and every message.
This plugs a hole where we didn't take m_rs_lock on any message that
didn't have the RDS_MSG_ON_CONN set. Taking m_rs_lock avoids
double frees and other memory corruptions as the ack code trusts
the message m_rs pointer on a socket that had actually been freed.
We must take m_rs_lock to access m_rs. Because of lock nesting and
rs access, we also need to acquire rs_lock.
Reviewed-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Signed-off-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/vport-gre.c')
0 files changed, 0 insertions, 0 deletions