[PATCH][2.5] sctp: possible sleep w/ lock held

From: Zwane Mwaikambo (zwane@linuxpower.ca)
Date: Tue Oct 01 2002 - 23:38:12 EST


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
+++ linux-2.5.40/net/sctp/protocol.c 2 Oct 2002 03:26:30 -0000
@@ -119,8 +119,7 @@
 
         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);
                         addr->a.v4.sin_family = AF_INET;
@@ -157,8 +156,7 @@
         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 the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 07 2002 - 22:00:32 EST