public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: fengguang.wu@intel.com
Cc: herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org,
	linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: sk_lock: inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-W} usage
Date: Thu, 09 Jul 2009 17:13:55 -0700 (PDT)	[thread overview]
Message-ID: <20090709.171355.09466097.davem@davemloft.net> (raw)
In-Reply-To: <20090709131746.GA27965@localhost>

From: Wu Fengguang <fengguang.wu@intel.com>
Date: Thu, 9 Jul 2009 21:17:46 +0800

> @@ -2100,7 +2100,8 @@ void tcp_send_fin(struct sock *sk)
>  	} else {
>  		/* Socket is locked, keep trying until memory is available. */
>  		for (;;) {
> -			skb = alloc_skb_fclone(MAX_TCP_HEADER, GFP_KERNEL);
> +			skb = alloc_skb_fclone(MAX_TCP_HEADER,
> +					       sk->sk_allocation);
>  			if (skb)
>  				break;
>  			yield();

I think this specific case needs more thinking.

If the allocation fails, and it's GFP_ATOMIC, we are going to yield()
(which sleeps) and loop endlessly waiting for the allocation to
succeed.

  reply	other threads:[~2009-07-10  0:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-08  2:37 sk_lock: inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-W} usage Wu Fengguang
2009-06-08  4:55 ` KOSAKI Motohiro
2009-06-08  5:00   ` Wu Fengguang
2009-06-08  5:07     ` KOSAKI Motohiro
     [not found]       ` <20090608140529.4376.A69D9226-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2009-06-08  5:53         ` Wu Fengguang
2009-06-08  5:56           ` Wu Fengguang
2009-06-08  6:12             ` KOSAKI Motohiro
     [not found]   ` <20090608134428.4373.A69D9226-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2009-06-09  3:07     ` Wu Fengguang
2009-06-09  3:15       ` KOSAKI Motohiro
2009-07-06 10:52 ` Herbert Xu
2009-07-09 13:17   ` Wu Fengguang
2009-07-10  0:13     ` David Miller [this message]
2009-07-10  0:59       ` Herbert Xu
2009-07-10  8:00       ` Wu Fengguang
2009-07-10  8:02         ` Herbert Xu
     [not found]           ` <20090710080247.GA2693-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2009-07-14 16:04             ` David Miller
2009-07-15  7:45               ` Wu Fengguang

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=20090709.171355.09466097.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=fengguang.wu@intel.com \
    --cc=herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox