From patchwork Sun Jan 30 12:11:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 81019 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 9CADFB7043 for ; Sun, 30 Jan 2011 23:12:04 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753804Ab1A3MLz (ORCPT ); Sun, 30 Jan 2011 07:11:55 -0500 Received: from narfation.org ([79.140.41.39]:45223 "EHLO v3-1039.vlinux.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753736Ab1A3MLy (ORCPT ); Sun, 30 Jan 2011 07:11:54 -0500 Received: from sven-desktop.home.narfation.org (i59F6CD6C.versanet.de [89.246.205.108]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 3CBA59406F; Sun, 30 Jan 2011 13:12:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=narfation.org; s=mail; t=1296389547; bh=EAokanws55n52NRl9/d0q35pYniF7I77eIVTNzJNtPo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=N3iCaeMV+OZ9t+hEqhu9b1y0Vw0UUAHzo0MjnQK0VBCxdHUYCRaB4n7/1KQ/xMVO+ P0+QXJbqUM7pd7ca8IcqNZkfOna0yMsLny86XC3xi4GPleVpMTcqH5F7j0d2VzIxIg Bj9tffSh8DTtl3EudBoCxXgKm/WvViLK/APiyVZY= From: Sven Eckelmann To: davem@davemloft.net Cc: netdev@vger.kernel.org, Sven Eckelmann Subject: [PATCH 2/4] batman-adv: Remove vis info on hashing errors Date: Sun, 30 Jan 2011 13:11:42 +0100 Message-Id: <1296389504-11208-3-git-send-email-sven@narfation.org> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1296389504-11208-1-git-send-email-sven@narfation.org> References: <1296389504-11208-1-git-send-email-sven@narfation.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org A newly created vis info object must be removed when it couldn't be added to the hash. The old_info which has to be replaced was already removed and isn't related to the hash anymore. Signed-off-by: Sven Eckelmann --- net/batman-adv/vis.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/batman-adv/vis.c b/net/batman-adv/vis.c index f69a374..0be55be 100644 --- a/net/batman-adv/vis.c +++ b/net/batman-adv/vis.c @@ -444,7 +444,7 @@ static struct vis_info *add_packet(struct bat_priv *bat_priv, info); if (hash_added < 0) { /* did not work (for some reason) */ - kref_put(&old_info->refcount, free_info); + kref_put(&info->refcount, free_info); info = NULL; }