Re: [PATCH v2] net: fix sleeping while atomic problem in sock mem_cgroup.

From: Glauber Costa
Date: Fri Dec 16 2011 - 04:54:11 EST


On 12/16/2011 01:31 PM, Eric Dumazet wrote:
Le vendredi 16 dÃcembre 2011 Ã 13:09 +0400, Glauber Costa a Ãcrit :
Since we can't scan the proto_list to initialize sock cgroups, as it
holds a rwlock, and we also want to keep the code generic enough to
avoid calling the initialization functions of protocols directly,
I propose we keep the interested parties in a separate list. This list
is protected by a mutex so we can sleep and do the necessary allocations.

Also fixes a reference problem found by Randy Dunlap's randconfig.

Signed-off-by: Glauber Costa<glommer@xxxxxxxxxxxxx>
CC: Hiroyouki Kamezawa<kamezawa.hiroyu@xxxxxxxxxxxxxx>
CC: David S. Miller<davem@xxxxxxxxxxxxx>
CC: Eric Dumazet<eric.dumazet@xxxxxxxxx>
CC: Stephen Rothwell<sfr@xxxxxxxxxxxxxxxx>
CC: Randy Dunlap<rdunlap@xxxxxxxxxxxx>
---

Sorry to come late, but why dont we convert proto_list_lock to a mutex ?

I didn't suggest this, as I imagined there could be some performance implications to be drawn from it that may not be obvious to me.

But if it is okay with you net guys, it is certainly okay with me as well.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/