From: Sasha Levin <sashal@kernel.org>
To: Nathan Chancellor <natechancellor@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Thomas Haller <thaller@redhat.com>,
Hangbin Liu <liuhangbin@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org
Subject: Re: [PATCH 4.9 41/51] fib_rules: return 0 directly if an exactly same rule exists when NLM_F_EXCL not supplied
Date: Sun, 19 May 2019 20:11:01 -0400 [thread overview]
Message-ID: <20190520001101.GE11972@sasha-vm> (raw)
In-Reply-To: <20190519154348.GA113991@archlinux-epyc>
On Sun, May 19, 2019 at 08:43:48AM -0700, Nathan Chancellor wrote:
>On Wed, May 15, 2019 at 12:56:16PM +0200, Greg Kroah-Hartman wrote:
>> From: Hangbin Liu <liuhangbin@gmail.com>
>>
>> [ Upstream commit e9919a24d3022f72bcadc407e73a6ef17093a849 ]
>>
>> With commit 153380ec4b9 ("fib_rules: Added NLM_F_EXCL support to
>> fib_nl_newrule") we now able to check if a rule already exists. But this
>> only works with iproute2. For other tools like libnl, NetworkManager,
>> it still could add duplicate rules with only NLM_F_CREATE flag, like
>>
>> [localhost ~ ]# ip rule
>> 0: from all lookup local
>> 32766: from all lookup main
>> 32767: from all lookup default
>> 100000: from 192.168.7.5 lookup 5
>> 100000: from 192.168.7.5 lookup 5
>>
>> As it doesn't make sense to create two duplicate rules, let's just return
>> 0 if the rule exists.
>>
>> Fixes: 153380ec4b9 ("fib_rules: Added NLM_F_EXCL support to fib_nl_newrule")
>> Reported-by: Thomas Haller <thaller@redhat.com>
>> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
>> Signed-off-by: David S. Miller <davem@davemloft.net>
>> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> ---
>> net/core/fib_rules.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> --- a/net/core/fib_rules.c
>> +++ b/net/core/fib_rules.c
>> @@ -429,9 +429,9 @@ int fib_nl_newrule(struct sk_buff *skb,
>> if (rule->l3mdev && rule->table)
>> goto errout_free;
>>
>> - if ((nlh->nlmsg_flags & NLM_F_EXCL) &&
>> - rule_exists(ops, frh, tb, rule)) {
>> - err = -EEXIST;
>> + if (rule_exists(ops, frh, tb, rule)) {
>> + if (nlh->nlmsg_flags & NLM_F_EXCL)
>> + err = -EEXIST;
>> goto errout_free;
>> }
>>
>>
>>
>
>Hi all,
>
>This commit is causing issues on Android devices when Wi-Fi and mobile
>data are both enabled. The device will do a soft reboot consistently.
>So far, I've had reports on the Pixel 3 XL, OnePlus 6, Pocophone, and
>Note 9 and I can reproduce on my OnePlus 6.
Is this something that happens with Linus's tree as well? or is this a
backport issue?
>Sorry for taking so long to report this, I just figured out how to
>reproduce it today and I didn't want to report it without that.
FWIW, if you see anything suspicious with -stable patches just let us
know separately from a "better" bug report for upstream, then we can at
least temporary pull it out of the stable queue while the issue is being
addressed.
--
Thanks,
Sasha
next prev parent reply other threads:[~2019-05-20 0:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190515090616.669619870@linuxfoundation.org>
2019-05-15 10:56 ` [PATCH 4.9 47/51] bonding: fix arp_validate toggling in active-backup mode Greg Kroah-Hartman
[not found] ` <20190515090628.066392616@linuxfoundation.org>
2019-05-19 15:43 ` [PATCH 4.9 41/51] fib_rules: return 0 directly if an exactly same rule exists when NLM_F_EXCL not supplied Nathan Chancellor
2019-05-19 20:27 ` Florian Westphal
2019-05-20 2:00 ` Hangbin Liu
2019-05-20 0:11 ` Sasha Levin [this message]
2019-05-20 0:29 ` David Ahern
2019-05-20 9:04 ` Greg Kroah-Hartman
2019-05-20 9:11 ` Greg Kroah-Hartman
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=20190520001101.GE11972@sasha-vm \
--to=sashal@kernel.org \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liuhangbin@gmail.com \
--cc=natechancellor@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=thaller@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).