[IPV6]: Ensure to use icmpv6_socket in non-preemptive context.
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Mon, 13 Jun 2005 21:59:44 +0000 (14:59 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Jun 2005 21:59:44 +0000 (14:59 -0700)
commit84427d533076a08137779b3182a71c37bf000b27
tree248f7bbcebe0be59bc9b520b8611133b870a5c71
parent979b6c135fc4d466a39d8e3ec05583e5ee30261a
[IPV6]: Ensure to use icmpv6_socket in non-preemptive context.

We saw following trace several times:

|BUG: using smp_processor_id() in preemptible [00000001] code: httpd/30137
|caller is icmpv6_send+0x23/0x540
| [<c01ad63b>] smp_processor_id+0x9b/0xb8
| [<c02993e7>] icmpv6_send+0x23/0x540

This is because of icmpv6_socket, which is the only one user of
smp_processor_id() in icmpv6_send(), AFAIK.

Since it should be used in non-preemptive context,
let's defer the dereference after disabling preemption
(by icmpv6_xmit_lock()).

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/icmp.c