Ilpo Järvinen a écrit : > I got plenty of these from sock_prot_inuse_add: > > BUG: using smp_processor_id() in preemptible [00000000] code: rcS/1146 > > caller is sock_prot_inuse_add+0x24/0x42 > Pid: 1146, comm: rcS Not tainted 2.6.28-rc6-01121-g89a2f15 #76 > Call Trace: > [] debug_smp_processor_id+0xd3/0xe8 > [] sock_prot_inuse_add+0x24/0x42 > [] unix_create1+0x161/0x176 > [] unix_create+0x60/0x6b > [] __sock_create+0x144/0x1bd > [] ? __sock_create+0xb9/0x1bd > [] sock_create+0x2d/0x2f > [] sys_socket+0x29/0x5b > [] system_call_fastpath+0x16/0x1b > > Thanks Ilpo for this report I guess the following is necessary. Once Christopher and Rusty work on percpu variables is finished, the preempt_enable()/disable() wont be necessary anymore, so its a temporary workaround anyway. [PATCH] net: make sock_prot_inuse_add() preempt safe Ilpo Järvinen reported that commit a8076d8db98de6da61394b2e942320e4612643ac (net: af_unix should update its inuse counter) was triggering a warning in smp_processor_id(), being called in a preemptible code. Fix is to make sock_prot_inuse_add() safe in this regard. This fix can be reverted when new percpu infrastructure is ready, allowing a cpu to safely do a increment/decrement on a percpu var. Signed-off-by: Eric Dumazet