From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Howells <dhowells@redhat.com>, Eric Dumazet <edumazet@google.com>
Cc: "David S . Miller" <davem@davemloft.net>,
netdev <netdev@vger.kernel.org>,
Eric Dumazet <eric.dumazet@gmail.com>,
syzbot <syzkaller@googlegroups.com>
Subject: Re: [PATCH v3 net] rxrpc: fix race condition in rxrpc_input_packet()
Date: Wed, 24 Apr 2019 09:40:33 -0700 [thread overview]
Message-ID: <ec40591b-d335-2539-732b-72aedbdbfce7@gmail.com> (raw)
In-Reply-To: <27703.1556094430@warthog.procyon.org.uk>
On 04/24/2019 01:27 AM, David Howells wrote:
>
> Acked-by: David Howells <dhowells@redhat.com>
>
A v4 is coming, since @local could be NULL in rxrpc_lookup_local()
as reported by kbuild test robot <lkp@intel.com> and Julia Lawall <julia.lawall@lip6.fr>
diff --git a/net/rxrpc/local_object.c b/net/rxrpc/local_object.c
index 15cf42d5b53a56d8d19cabdc8c2b55156d73d28a..01959db51445ca00e6044d8a849e698c4ab17a33 100644
--- a/net/rxrpc/local_object.c
+++ b/net/rxrpc/local_object.c
@@ -304,7 +304,8 @@ struct rxrpc_local *rxrpc_lookup_local(struct net *net,
ret = -ENOMEM;
sock_error:
mutex_unlock(&rxnet->local_mutex);
- kfree(local);
+ if (local)
+ call_rcu(&local->rcu, rxrpc_local_rcu);
_leave(" = %d", ret);
return ERR_PTR(ret);
prev parent reply other threads:[~2019-04-24 16:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-24 0:47 [PATCH v3 net] rxrpc: fix race condition in rxrpc_input_packet() Eric Dumazet
2019-04-24 8:27 ` David Howells
2019-04-24 16:40 ` Eric Dumazet [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=ec40591b-d335-2539-732b-72aedbdbfce7@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=edumazet@google.com \
--cc=netdev@vger.kernel.org \
--cc=syzkaller@googlegroups.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).