linux/drivers/net/ethernet/freescale/fman
Denis Kirjanov 803fafbe0c fsl/fman: avoid sleeping in atomic context while adding an address
__dev_mc_add grabs an adress spinlock so use
atomic context in kmalloc.

/ # ifconfig eth0 inet 192.168.0.111
[   89.331622] BUG: sleeping function called from invalid context at mm/slab.h:420
[   89.339002] in_atomic(): 1, irqs_disabled(): 0, pid: 1035, name: ifconfig
[   89.345799] 2 locks held by ifconfig/1035:
[   89.349908]  #0:  (rtnl_mutex){+.+.}, at: [<(ptrval)>] devinet_ioctl+0xc0/0x8a0
[   89.357258]  #1:  (_xmit_ETHER){+...}, at: [<(ptrval)>] __dev_mc_add+0x28/0x80
[   89.364520] CPU: 1 PID: 1035 Comm: ifconfig Not tainted 4.16.0-rc3-dirty #8
[   89.371464] Call Trace:
[   89.373908] [e959db60] [c066f948] dump_stack+0xa4/0xfc (unreliable)
[   89.380177] [e959db80] [c00671d8] ___might_sleep+0x248/0x280
[   89.385833] [e959dba0] [c01aec34] kmem_cache_alloc_trace+0x174/0x320
[   89.392179] [e959dbd0] [c04ab920] dtsec_add_hash_mac_address+0x130/0x240
[   89.398874] [e959dc00] [c04a9d74] set_multi+0x174/0x1b0
[   89.404093] [e959dc30] [c04afb68] dpaa_set_rx_mode+0x68/0xe0
[   89.409745] [e959dc40] [c057baf8] __dev_mc_add+0x58/0x80
[   89.415052] [e959dc60] [c060fd64] igmp_group_added+0x164/0x190
[   89.420878] [e959dca0] [c060ffa8] ip_mc_inc_group+0x218/0x460
[   89.426617] [e959dce0] [c06120fc] ip_mc_up+0x3c/0x190
[   89.431662] [e959dd10] [c0607270] inetdev_event+0x250/0x620
[   89.437227] [e959dd50] [c005f190] notifier_call_chain+0x80/0xf0
[   89.443138] [e959dd80] [c0573a74] __dev_notify_flags+0x54/0xf0
[   89.448964] [e959dda0] [c05743f8] dev_change_flags+0x48/0x60
[   89.454615] [e959ddc0] [c0606744] devinet_ioctl+0x544/0x8a0
[   89.460180] [e959de10] [c060987c] inet_ioctl+0x9c/0x1f0
[   89.465400] [e959de80] [c05479a8] sock_ioctl+0x168/0x460
[   89.470708] [e959ded0] [c01cf3ec] do_vfs_ioctl+0xac/0x8c0
[   89.476099] [e959df20] [c01cfc40] SyS_ioctl+0x40/0xc0
[   89.481147] [e959df40] [c0011318] ret_from_syscall+0x0/0x3c
[   89.486715] --- interrupt: c01 at 0x1006943c
[   89.486715]     LR = 0x100c45ec

Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
Acked-by: Madalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-03-07 10:48:07 -05:00
..
Kconfig fsl/fman: add dependency on HAS_DMA 2017-06-27 15:42:30 -04:00
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-11-04 09:26:51 +09:00
fman.c fsl/fman: make arrays port_ids static, reduces object code size 2017-09-01 18:21:09 -07:00
fman.h fsl/fman: enable FMan Keygen 2017-08-28 16:41:00 -07:00
fman_dtsec.c fsl/fman: avoid sleeping in atomic context while adding an address 2018-03-07 10:48:07 -05:00
fman_dtsec.h fsl/fman: Add FMan MAC support 2015-12-27 20:51:40 -05:00
fman_keygen.c fsl/fman: enable FMan Keygen 2017-08-28 16:41:00 -07:00
fman_keygen.h fsl/fman: enable FMan Keygen 2017-08-28 16:41:00 -07:00
fman_mac.h fsl/fman: remove leftover comment 2016-10-04 10:08:44 +03:00
fman_memac.c fsl/fman: take into account all RGMII modes 2017-04-01 11:49:14 -07:00
fman_memac.h net: break include loop netdevice.h, dsa.h, devlink.h 2017-03-28 22:46:04 -07:00
fman_muram.c fsl/fman: split lines over 80 characters 2016-10-04 09:26:05 +03:00
fman_muram.h fsl/fman: split lines over 80 characters 2016-10-04 09:26:05 +03:00
fman_port.c fsl/fman_port: mark expected switch fall-throughs 2017-11-11 18:50:33 +09:00
fman_port.h dpaa_eth: add NETIF_F_RXHASH 2017-08-28 16:41:00 -07:00
fman_sp.c fsl/fman: fix loadable module compilation 2016-10-04 09:26:05 +03:00
fman_sp.h fsl/fman: Add FMan SP support 2015-12-27 20:51:40 -05:00
fman_tgec.c fsl/fman: fix a leak in tgec_free() 2016-11-25 20:29:48 -05:00
fman_tgec.h fsl/fman: Add FMan MAC support 2015-12-27 20:51:40 -05:00
mac.c fsl/fman: Remove a useless 'dev_err()' call 2017-11-08 13:53:34 +09:00
mac.h dpaa_eth: change device used 2017-10-18 13:44:47 +01:00