From patchwork Mon Sep 28 07:12:11 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarek Poplawski X-Patchwork-Id: 34368 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.176.167]) by ozlabs.org (Postfix) with ESMTP id A3EB8B7BEE for ; Mon, 28 Sep 2009 17:12:27 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751486AbZI1HMP (ORCPT ); Mon, 28 Sep 2009 03:12:15 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751302AbZI1HMO (ORCPT ); Mon, 28 Sep 2009 03:12:14 -0400 Received: from mail-fx0-f218.google.com ([209.85.220.218]:57965 "EHLO mail-fx0-f218.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750917AbZI1HMN (ORCPT ); Mon, 28 Sep 2009 03:12:13 -0400 Received: by fxm18 with SMTP id 18so3435345fxm.17 for ; Mon, 28 Sep 2009 00:12:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=fX5lomy90Bp4ACfa7Hfrs1MnaAgHjcNeG3/8lRdql5M=; b=YAIpX/zUYdsn6j9cDeTfKAlCiux1u152YuBMoBugZG1Yf2jJImfQ43VH2tolYyxxz3 7SwBDJ9dEEUA+QVV2UWaDfz+aC7Tq10G6gzLrwbw1+YL45zUfIzt6mRL1vEAARs19U2l lHDmuQX8IZ8cv+foG5EPs6CS17Ry6UllNfFwM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=FV6iYRXh0dIq8mOhrulfAPpSfkjdtAynRyOUJBJYexKq3rd1AnT3MJAbuC3oh+FfiY iVUWJ1Vh8bDAgB881Zse2P7/CKeGt/the4VqyfMI8audorLj2rrwz1rVNdThN9lUfNMg PoxmRWd3yX5OS9BAd4heoETJiQSB9gZle9Tl8= Received: by 10.86.221.25 with SMTP id t25mr3080881fgg.19.1254121936880; Mon, 28 Sep 2009 00:12:16 -0700 (PDT) Received: from ff.dom.local (bv170.internetdsl.tpnet.pl [80.53.205.170]) by mx.google.com with ESMTPS id d4sm5083628fga.7.2009.09.28.00.12.15 (version=SSLv3 cipher=RC4-MD5); Mon, 28 Sep 2009 00:12:16 -0700 (PDT) Date: Mon, 28 Sep 2009 07:12:11 +0000 From: Jarek Poplawski To: David Miller Cc: Bernard Pidoux F6BVP , Bernard Pidoux , Ralf Baechle DL5RB , Linux Netdev List , linux-hams Subject: [PATCH] ax25: Add missing dev_put in ax25_setsockopt Message-ID: <20090928071211.GA8658@ff.dom.local> References: <20090921201157.GA5460@del.dom.local> <4ABA9058.3010605@free.fr> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4ABA9058.3010605@free.fr> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org There is no dev_put ending positive SO_BINDTODEVICE call in ax25_setsockopt and no matching dev_put later. This ref isn't used by ax25_cb's because it's handled with up and down device events. BTW of reported-by: Bernard Pidoux F6BVP Signed-off-by: Jarek Poplawski --- net/ax25/af_ax25.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index fbcac76..3eee8eb 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c @@ -663,6 +663,7 @@ static int ax25_setsockopt(struct socket *sock, int level, int optname, ax25->ax25_dev = ax25_dev_ax25dev(dev); ax25_fillin_cb(ax25, ax25->ax25_dev); + dev_put(dev); break; default: