Re: net-next/unix: BUG: using smp_processor_id() in preemptible

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ilpo Järvinen <ilpo.jarvinen@...>, David Miller <davem@...>
Cc: Netdev <netdev@...>
Date: Saturday, November 22, 2008 - 11:32 pm

Ilpo J=E4rvinen a =E9crit :

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=E4rvinen reported that commit a8076d8db98de6da61394b2e942320e46126=
43ac
(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 <dada1@cosmosbay.com>
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: net-next/unix: BUG: using smp_processor_id() in preempti..., Eric Dumazet, (Sat Nov 22, 11:32 pm)