All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Grimm <jgrimm2@us.ibm.com>
To: Andrew Morton <akpm@digeo.com>
Cc: Luc Van Oostenryck <luc.vanoostenryck@easynet.be>,
	Thomas Molina <tmolina@cox.net>,
	lksctp-developers@lists.sourceforge.net,
	Kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [Lksctp-developers] Re: (more) Sleeping function called from illegal  context...
Date: Mon, 30 Sep 2002 08:34:15 -0500	[thread overview]
Message-ID: <3D9852D7.C723BCC9@us.ibm.com> (raw)
In-Reply-To: 3D950590.1F9FBDC6@digeo.com

See Patch below to stop any bleeding.   I'll feed the patch in through
DaveM.  

Thanks, Jon  

Andrew Morton wrote:
> 
> Luc Van Oostenryck wrote:
> >

> >
> 
> sctp_v4_get_local_addr_list():
> 
>                 /* XXX BUG: sleeping allocation with lock held -DaveM */
>                 addr = t_new(struct sockaddr_storage_list, GFP_KERNEL);
> 
> Is true.  We're holding dev_base_lock, inetdev_lock and in_dev->lock
> here.

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or
higher.
# This patch includes the following deltas:
#	           ChangeSet	1.655   -> 1.656  
#	 net/sctp/protocol.c	1.7     -> 1.8    
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/09/30	jgrimm@touki.austin.ibm.com	1.656
# sctp:  Fix GFP_KERNEL allocation with lock held. 
# --------------------------------------------
#
diff -Nru a/net/sctp/protocol.c b/net/sctp/protocol.c
--- a/net/sctp/protocol.c	Mon Sep 30 08:20:55 2002
+++ b/net/sctp/protocol.c	Mon Sep 30 08:20:55 2002
@@ -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;

  parent reply	other threads:[~2002-09-30 13:58 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-27 23:30 Sleeping function called from illegal context Greg KH
2002-09-27 23:50 ` Andrew Morton
2002-09-28  0:43   ` (more) " Luc Van Oostenryck
2002-09-28  1:22     ` Andrew Morton
2002-09-28  0:44   ` Luc Van Oostenryck
2002-09-28  1:24     ` Andrew Morton
2002-09-28  2:15       ` Greg KH
2002-09-28  0:44   ` Luc Van Oostenryck
2002-09-28  1:27     ` Andrew Morton
2002-09-30 12:50       ` [Lksctp-developers] " Jon Grimm
2002-09-30 13:34       ` Jon Grimm [this message]
2002-09-28  2:04   ` Andre Hedrick
2002-09-28  3:06     ` Robert Love
2002-09-28  3:21       ` Andre Hedrick
2002-09-28  3:29         ` Robert Love
2002-09-28 10:06         ` Alan Cox
2002-09-28 17:06           ` Robert Love
2002-09-28  0:51 ` Robert Love
2002-09-28  2:16   ` Greg KH
2002-09-28 14:54   ` John Levon
2002-09-28 17:05     ` Andrew Morton
2002-09-28 17:24       ` John Levon
2002-09-28 18:27         ` Robert Love
2002-09-28 18:38           ` John Levon
2002-09-29  0:50           ` William Lee Irwin III

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D9852D7.C723BCC9@us.ibm.com \
    --to=jgrimm2@us.ibm.com \
    --cc=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lksctp-developers@lists.sourceforge.net \
    --cc=luc.vanoostenryck@easynet.be \
    --cc=tmolina@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.