Re: siw trigger BUG: sleeping function called from invalid context at mm/slab.h:50

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/23/19 4:02 PM, Bart Van Assche wrote:
If I try to associate the ib_srpt driver with the siw driver the
complaint shown below appears on the console.
According to gdb:

(gdb) list *(siw_create_listen+0x2f5)
0x6195 is in siw_create_listen (drivers/infiniband/sw/siw
/siw_cm.c:2011).
2006                            bind_addr.sin6_port =
                                        s_laddr->sin6_port;
2007                            bind_addr.sin6_flowinfo = 0;
2008                            bind_addr.sin6_addr = ifp->addr;
2009                            bind_addr.sin6_scope_id = dev->ifindex;
2010
2011                            rv = siw_listen_address(id, backlog,
2012                                      (struct sockaddr *)&bind_addr,
2013                                            AF_INET6);
2014                            if (!rv)
2015                                      listeners++;

This is the code that causes trouble:

	read_lock_bh(&in6_dev->lock);
	list_for_each_entry(ifp, &in6_dev->addr_list, if_list) {
		struct sockaddr_in6 bind_addr;

		if (ipv6_addr_any(&s_laddr->sin6_addr) ||
		    ipv6_addr_equal(&s_laddr->sin6_addr, &ifp->addr)) {
			bind_addr.sin6_family = AF_INET6;
			bind_addr.sin6_port = s_laddr->sin6_port;
			bind_addr.sin6_flowinfo = 0;
			bind_addr.sin6_addr = ifp->addr;
			bind_addr.sin6_scope_id = dev->ifindex;
				rv = siw_listen_address(id, backlog,
					(struct sockaddr *)&bind_addr,
					AF_INET6);
			if (!rv)
				listeners++;
		}
	}
	read_unlock_bh(&in6_dev->lock);

siw_listen_address() calls sock_create(). I don't think it is allowed to call sock_create() from atomic context.

Thanks,

Bart.



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux