From: David Miller <davem@davemloft.net>
To: vfalico@redhat.com
Cc: netdev@vger.kernel.org, thomas@glanzmann.de,
dingtianhong@huawei.com, fubar@us.ibm.com, andy@greyhouse.net
Subject: Re: [PATCH v2 net-next] bonding: make slave status notifications GFP_ATOMIC
Date: Thu, 06 Mar 2014 14:56:55 -0500 (EST) [thread overview]
Message-ID: <20140306.145655.2060309492608052731.davem@davemloft.net> (raw)
In-Reply-To: <1394116402-5585-1-git-send-email-vfalico@redhat.com>
From: Veaceslav Falico <vfalico@redhat.com>
Date: Thu, 6 Mar 2014 15:33:22 +0100
> Currently we're using GFP_KERNEL, however there are some path(s) where we
> can hold some spinlocks, specifically bond->curr_slave_lock:
>
> [ 4.722916] BUG: sleeping function called from invalid context at mm/slub.c:965
> [ 4.724438] in_atomic(): 1, irqs_disabled(): 0, pid: 940, name: ifup-eth
> [ 4.726034] 5 locks held by ifup-eth/940:
> ...snip...
> [ 4.734646] #4: (&bond->curr_slave_lock){+...+.}, at: [<ffffffffa00badc6>] bond_enslave+0xda6/0xdd0 [bonding]
> ...snip...
> [ 4.759081] [<ffffffffa00b6f11>] bond_change_active_slave+0x191/0x3b0 [bonding]
> [ 4.760917] [<ffffffffa00b7227>] bond_select_active_slave+0xf7/0x1d0 [bonding]
> [ 4.762751] [<ffffffffa00badce>] bond_enslave+0xdae/0xdd0 [bonding]
> ...snip...
>
> As it's out of hot path and is a really rare event - change the gfp_t flags
> to GFP_ATOMIC to avoid sleeping under spinlock.
>
> v2: convert new notify calls to GFP_ATOMIC.
>
> CC: Thomas Glanzmann <thomas@glanzmann.de>
> CC: Ding Tianhong <dingtianhong@huawei.com>
> CC: Jay Vosburgh <fubar@us.ibm.com>
> CC: Andy Gospodarek <andy@greyhouse.net>
> Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Applied, thanks.
prev parent reply other threads:[~2014-03-06 19:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-06 14:33 [PATCH v2 net-next] bonding: make slave status notifications GFP_ATOMIC Veaceslav Falico
2014-03-06 19:56 ` David Miller [this message]
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=20140306.145655.2060309492608052731.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=andy@greyhouse.net \
--cc=dingtianhong@huawei.com \
--cc=fubar@us.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=thomas@glanzmann.de \
--cc=vfalico@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).