On 05.12.2010 19:05, Oliver Hartkopp wrote: > On 05.12.2010 18:27, Marc Kleine-Budde wrote:
>>> That was the reason, why it put this together in the locked region. >> >> then we must use the 2nd fix >> >>> diff --git a/net/can/af_can.c b/net/can/af_can.c index 702be5a..b046ff0 >>> 100644 --- a/net/can/af_can.c +++ b/net/can/af_can.c @@ -418,7 +418,7 >>> @@ int can_rx_register(struct net_device *dev, canid_t can_id, canid_t >>> mask, if (dev && dev->type != ARPHRD_CAN) return -ENODEV; >>> >>> - r = kmem_cache_alloc(rcv_cache, GFP_KERNEL); + r = >>> kmem_cache_alloc(rcv_cache, GFP_ATOMIC); if (!r) return -ENOMEM; >>> >> > > Hm - in general there's no reason to have this kmem_cache_alloc() running > with GFP_ATOMIC as can_rx_register() is always triggered from userspace- or > from softirq-context (notifier). > > I expect the problem somewhere in the netlink/locking stuff ... Michal, please check out the latest revision 1222 of the SocketCAN SVN to update gw.c. I removed the private locking via cgw_list_lock as i discovered that the rtnl_lock is always set at all changes to network configuration. I tested the changed can-gw.ko by removing the module or by removing configured netdevices to trigger the notifier - and everything looked good. Let's see if the new can-gw version 20101205 makes it :-) Regards, Oliver _______________________________________________ Socketcan-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-users
