mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-17 10:26:09 +00:00
rds: Lost locking in loop connection freeing
The conn is removed from list in there and this requires proper lock protection. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
53ab2221da
commit
58c490babd
@ -134,8 +134,12 @@ static int rds_loop_conn_alloc(struct rds_connection *conn, gfp_t gfp)
|
|||||||
static void rds_loop_conn_free(void *arg)
|
static void rds_loop_conn_free(void *arg)
|
||||||
{
|
{
|
||||||
struct rds_loop_connection *lc = arg;
|
struct rds_loop_connection *lc = arg;
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
rdsdebug("lc %p\n", lc);
|
rdsdebug("lc %p\n", lc);
|
||||||
|
spin_lock_irqsave(&loop_conns_lock, flags);
|
||||||
list_del(&lc->loop_node);
|
list_del(&lc->loop_node);
|
||||||
|
spin_unlock_irqrestore(&loop_conns_lock, flags);
|
||||||
kfree(lc);
|
kfree(lc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user