From patchwork Sat Oct 19 22:21:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 3532 Return-Path: Received: from s3.neomailbox.net (s3.neomailbox.net [178.209.62.157]) by open-mesh.org (Postfix) with ESMTPS id CF5E9602250 for ; Sun, 20 Oct 2013 00:22:57 +0200 (CEST) From: Antonio Quartulli To: davem@davemloft.net Date: Sun, 20 Oct 2013 00:21:53 +0200 Message-Id: <1382221330-3769-2-git-send-email-antonio@meshcoding.com> In-Reply-To: <1382221330-3769-1-git-send-email-antonio@meshcoding.com> References: <1382221330-3769-1-git-send-email-antonio@meshcoding.com> Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org, Antonio Quartulli Subject: [B.A.T.M.A.N.] [PATCH 01/18] batman-adv: check skb preparation return value X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Oct 2013 22:22:57 -0000 Fix bogus merge conflict resolution by checking the return values of the skb preparation routines. Signed-off-by: Antonio Quartulli --- net/batman-adv/send.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c index 82588e4..d765d53 100644 --- a/net/batman-adv/send.c +++ b/net/batman-adv/send.c @@ -267,11 +267,14 @@ int batadv_send_skb_generic_unicast(struct batadv_priv *bat_priv, switch (packet_type) { case BATADV_UNICAST: - batadv_send_skb_prepare_unicast(skb, orig_node); + if (!batadv_send_skb_prepare_unicast(skb, orig_node)) + goto out; break; case BATADV_UNICAST_4ADDR: - batadv_send_skb_prepare_unicast_4addr(bat_priv, skb, orig_node, - packet_subtype); + if (!batadv_send_skb_prepare_unicast_4addr(bat_priv, skb, + orig_node, + packet_subtype)) + goto out; break; default: /* this function supports UNICAST and UNICAST_4ADDR only. It