From: Pavel Emelyanov Date: Tue, 2 Nov 2010 01:52:05 +0000 (+0000) Subject: rds: Lost locking in loop connection freeing X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=58c490babd4b425310363cbd1f406d7e508f77a5;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David S. Miller --- diff --git a/net/rds/loop.c b/net/rds/loop.c index c390156b426f..aeec1d483b17 100644 --- a/net/rds/loop.c +++ b/net/rds/loop.c @@ -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) { struct rds_loop_connection *lc = arg; + unsigned long flags; + rdsdebug("lc %p\n", lc); + spin_lock_irqsave(&loop_conns_lock, flags); list_del(&lc->loop_node); + spin_unlock_irqrestore(&loop_conns_lock, flags); kfree(lc); }