From: David Ahern <dsahern@gmail.com>
To: Jia-Ju Bai <baijiaju1990@gmail.com>,
davem@davemloft.net, kuznet@ms2.inr.ac.ru,
yoshfuji@linux-ipv6.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: ipv6: route: Fix a sleep-in-atomic-context bug in ip6_convert_metrics()
Date: Sat, 1 Sep 2018 22:25:55 -0600 [thread overview]
Message-ID: <4cbf0c0c-ec8b-d953-8ff8-c5cab4d10441@gmail.com> (raw)
In-Reply-To: <20180901111958.26529-1-baijiaju1990@gmail.com>
On 9/1/18 5:19 AM, Jia-Ju Bai wrote:
> The kernel module may sleep with holding a spinlock.
...
> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> index ec18b3ce8b6d..d15e72def7c1 100644
> --- a/net/ipv6/route.c
> +++ b/net/ipv6/route.c
> @@ -2742,7 +2742,7 @@ static int ip6_convert_metrics(struct net *net, struct fib6_info *rt,
> if (!cfg->fc_mx)
> return 0;
>
> - p = kzalloc(sizeof(*rt->fib6_metrics), GFP_KERNEL);
> + p = kzalloc(sizeof(*rt->fib6_metrics), GFP_ATOMIC);
> if (unlikely(!p))
> return -ENOMEM;
>
>
This is the wrong solution. I'll take care of it next week after the
holiday weekend.
next prev parent reply other threads:[~2018-09-02 4:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-01 11:19 [PATCH] net: ipv6: route: Fix a sleep-in-atomic-context bug in ip6_convert_metrics() Jia-Ju Bai
2018-09-02 4:25 ` David Ahern [this message]
2018-09-04 2:40 ` David Ahern
2018-09-04 3:38 ` Jia-Ju Bai
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=4cbf0c0c-ec8b-d953-8ff8-c5cab4d10441@gmail.com \
--to=dsahern@gmail.com \
--cc=baijiaju1990@gmail.com \
--cc=davem@davemloft.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.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;
as well as URLs for NNTP newsgroup(s).