From: David Miller <davem@davemloft.net>
To: tommi.t.rantala@nokia.com
Cc: jon.maloy@ericsson.com, ying.xue@windriver.com,
netdev@vger.kernel.org, tipc-discussion@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tipc: call tipc_rcv() only if bearer is up in tipc_udp_recv()
Date: Tue, 28 Nov 2017 09:58:37 -0500 (EST) [thread overview]
Message-ID: <20171128.095837.899409439582426451.davem@davemloft.net> (raw)
In-Reply-To: <20171128125315.25334-1-tommi.t.rantala@nokia.com>
From: Tommi Rantala <tommi.t.rantala@nokia.com>
Date: Tue, 28 Nov 2017 14:53:15 +0200
> Call tipc_rcv() only if bearer is up in tipc_udp_recv().
> Fixes a rare TIPC div-by-zero crash in tipc_node_calculate_timer():
>
> We're enabling a bearer, but it's not yet up and fully initialized.
> At the same time we receive a discovery packet, and in tipc_udp_recv()
> we end up calling tipc_rcv() with the not-yet-initialized bearer,
> causing later a div-by-zero crash in tipc_node_calculate_timer().
You're also now ignoring any error being returned by tipc_udp_rcast_disc().
> -
> - if (unlikely(msg_user(hdr) == LINK_CONFIG)) {
> - err = tipc_udp_rcast_disc(b, skb);
> - if (err)
> - goto rcu_out;
> + } else {
> + if (unlikely(b && msg_user(hdr) == LINK_CONFIG))
> + tipc_udp_rcast_disc(b, skb);
> + kfree_skb(skb);
> }
Either put the 'err' propagation back or clearly explain in your
commit log message why this part of the change if absolutely essential
for this bug fix.
Thank you.
next prev parent reply other threads:[~2017-11-28 14:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-28 12:53 [PATCH] tipc: call tipc_rcv() only if bearer is up in tipc_udp_recv() Tommi Rantala
2017-11-28 13:15 ` Jon Maloy
2017-11-28 14:58 ` David Miller [this message]
2017-11-28 18:16 ` Tommi Rantala
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=20171128.095837.899409439582426451.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jon.maloy@ericsson.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tipc-discussion@lists.sourceforge.net \
--cc=tommi.t.rantala@nokia.com \
--cc=ying.xue@windriver.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).