[2.5] sctp: possible sleep w/ lock held

[2.5] sctp: possible sleep w/ lock held

Post by Zwane Mwaikamb » Thu, 03 Oct 2002 07:20:07



Index: linux-2.5.40/net/sctp/protocol.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.40/net/sctp/protocol.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 protocol.c
--- linux-2.5.40/net/sctp/protocol.c    1 Oct 2002 12:29:11 -0000       1.1.1.1

        for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) {
                /* Add the address to the local list.  */
-               /* XXX BUG: sleeping allocation with lock held -DaveM */
-               addr = t_new(struct sockaddr_storage_list, GFP_KERNEL);
+               addr = t_new(struct sockaddr_storage_list, GFP_ATOMIC);
                if (addr) {
                        INIT_LIST_HEAD(&addr->list);

        read_lock_bh(&in6_dev->lock);
        for (ifp = in6_dev->addr_list; ifp; ifp = ifp->if_next) {
                /* Add the address to the local list.  */
-               /* XXX BUG: sleeping allocation with lock held -DaveM */
-               addr = t_new(struct sockaddr_storage_list, GFP_KERNEL);
+               addr = t_new(struct sockaddr_storage_list, GFP_ATOMIC);
                if (addr) {
                        addr->a.v6.sin6_family = AF_INET6;
                        addr->a.v6.sin6_port = 0;

--
function.linuxpower.ca

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/