From patchwork Thu Oct 8 16:08:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schultz X-Patchwork-Id: 527808 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id CF808140D8A for ; Fri, 9 Oct 2015 03:09:09 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934361AbbJHQI6 (ORCPT ); Thu, 8 Oct 2015 12:08:58 -0400 Received: from mail.tpip.net ([92.43.49.48]:56299 "EHLO mail.tpip.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932663AbbJHQI5 (ORCPT ); Thu, 8 Oct 2015 12:08:57 -0400 Received: from office.tpip.net (office.tpip.net [92.43.51.2]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.tpip.net (Postfix) with ESMTPS id 82F814F415; Thu, 8 Oct 2015 16:08:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by office.tpip.net (Postfix) with ESMTP id 27F17A2F78; Thu, 8 Oct 2015 18:08:54 +0200 (CEST) Received: from office.tpip.net ([127.0.0.1]) by localhost (office.tpip.net [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id twRiBmVAV2R6; Thu, 8 Oct 2015 18:08:53 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by office.tpip.net (Postfix) with ESMTP id DAEC0A2F77; Thu, 8 Oct 2015 18:08:53 +0200 (CEST) X-Virus-Scanned: amavisd-new at tpip.net Received: from office.tpip.net ([127.0.0.1]) by localhost (office.tpip.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id CIqCyH_IXfDB; Thu, 8 Oct 2015 18:08:53 +0200 (CEST) Received: from alice.tpip.org (unknown [192.168.13.53]) by office.tpip.net (Postfix) with ESMTPSA id 8792BA2F79; Thu, 8 Oct 2015 18:08:53 +0200 (CEST) From: Andreas Schultz To: netdev@vger.kernel.org Cc: Pravin B Shelar , "David S. Miller" Subject: [PATCH net v3 2/2] tipc: remove invalid ip_rt_put Date: Thu, 8 Oct 2015 18:08:50 +0200 Message-Id: <1444320530-28706-2-git-send-email-aschultz@tpip.net> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1444320530-28706-1-git-send-email-aschultz@tpip.net> References: <1444320530-28706-1-git-send-email-aschultz@tpip.net> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org udp_tunnel_xmit_skb() will free the skb and release the rt->dst reference in the error case. There is no need (and it would actully trigger a warning) when we did. This problem was not visible before, as udp_tunnel_xmit_skb() would never return a value < 0 Acked-by: Jiri Benc --- net/tipc/udp_media.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c index c170d31..de8e110 100644 --- a/net/tipc/udp_media.c +++ b/net/tipc/udp_media.c @@ -181,10 +181,6 @@ static int tipc_udp_send_msg(struct net *net, struct sk_buff *skb, dst->ipv4.s_addr, 0, ttl, 0, src->udp_port, dst->udp_port, false, true); - if (err < 0) { - ip_rt_put(rt); - goto tx_error; - } #if IS_ENABLED(CONFIG_IPV6) } else { struct dst_entry *ndst;