On 08/13/16 14:27, Ryota Ozaki wrote:
On Fri, Aug 12, 2016 at 11:04 PM, Nick Hudson <sk...@netbsd.org> wrote:
On 07/28/16 10:03, Ryota Ozaki wrote:
Module Name:    src
Committed By:   ozaki-r
Date:           Thu Jul 28 09:03:51 UTC 2016

Modified Files:
         src/sys/netinet: if_arp.c in.c
         src/sys/netinet6: in6.c nd6_nbr.c

Log Message:
Fix panic on adding/deleting IP addresses under network load

Adding and deleting IP addresses aren't serialized with other network
opeartions, e.g., forwarding packets. So if we add or delete an IP
address under network load, a kernel panic may happen on manipulating
network-related shared objects such as rtentry and rtcache.

To avoid such panicks, we still need to hold softnet_lock in in_control
and in6_control that are called via ioctl and do network-related
operations
including IP address additions/deletions.

Fix PR kern/51356

Hi,

This is contributory to the problems in

     http://gnats.netbsd.org/49065

     http://gnats.netbsd.org/50491

     http://gnats.netbsd.org/51395

Where softnet_lock is held by something that sleeps, e.g. a usb transfer.

     http://mail-index.netbsd.org/tech-net/2015/12/06/msg005443.html

This patch

     http://www.netbsd.org/~skrll/usb.softint.diff

helps, but I'm not sure it deals with all the problems in the network stack.
Is this something you intend to address?
No. The commit prevents parallel accesses on shared data (rtentry, ifaddr,
etc.). The issue of USB transfers seem to be a deadlock between softints
of the network stack and USB interrupt processing.

I think we can commit your patch if it fixes the PRs and doesn't break
anything.

Of course we should get rid of softnet_lock at some point.

Thanks,
   ozaki-r

This is hurting me again.

Can you, or someone else at iij, explain the plan to allow NET_MPSAFE to
be enabled by default.  Perhaps others can help if there are clear steps.

Thanks,
Nick

Reply via email to