From patchwork Wed Feb 12 22:38:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King - ARM Linux X-Patchwork-Id: 3641391 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DE4F09F334 for ; Wed, 12 Feb 2014 22:38:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 05DE620149 for ; Wed, 12 Feb 2014 22:38:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 072B920145 for ; Wed, 12 Feb 2014 22:38:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753422AbaBLWi2 (ORCPT ); Wed, 12 Feb 2014 17:38:28 -0500 Received: from gw-1.arm.linux.org.uk ([78.32.30.217]:34489 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753007AbaBLWi2 (ORCPT ); Wed, 12 Feb 2014 17:38:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=pandora; h=Sender:Content-Type:MIME-Version:Message-ID:Subject:To:From:Date; bh=4CikICOziKpJhKxIOmZTD+2zoTpUNP+pzMBtc9ko+4I=; b=lgAMbqjX3nunZCc3MtpS9XZt63PTDaeM8+jR588LnV+nv9DTLUziQqFSu2Mics7gDiGZ87oflRw+szZXCyGMVeofqeVHJkAY2XR0I1qbquJ8B7FEoZnzRfVeBDRKXGm44qsjoM2TfonGZx7MF9SJibEqZEqtV+TNQ58HJL9qbiE=; Received: from n2100.arm.linux.org.uk ([2002:4e20:1eda:1:214:fdff:fe10:4f86]:32997) by pandora.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1WDiRf-0008PM-3b; Wed, 12 Feb 2014 22:38:19 +0000 Received: from linux by n2100.arm.linux.org.uk with local (Exim 4.76) (envelope-from ) id 1WDiRd-0001qb-OQ; Wed, 12 Feb 2014 22:38:17 +0000 Date: Wed, 12 Feb 2014 22:38:17 +0000 From: Russell King - ARM Linux To: David Howells , Jouni Malinen , Johannes Berg , linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, Al Viro Subject: [PATCH] hostap: fix "hostap: proc: Use remove_proc_subtree()" Message-ID: <20140212223817.GS26684@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP remove_proc_subtree() doesn't work here as local->ddev has already been removed, and NULLed out. Use proc_remove() instead. Signed-off-by: Russell King Tested-by: Russell King --- I would include an oops, however the machine I discovered this on has a page 0 populated - so the symptoms are multiple 'wlan0' entries in /proc/net/hostap. This is probably a candidate for stable too. drivers/net/wireless/hostap/hostap_proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/hostap/hostap_proc.c b/drivers/net/wireless/hostap/hostap_proc.c index aa7ad3a7a69b..4e5c0f8c9496 100644 --- a/drivers/net/wireless/hostap/hostap_proc.c +++ b/drivers/net/wireless/hostap/hostap_proc.c @@ -496,7 +496,7 @@ void hostap_init_proc(local_info_t *local) void hostap_remove_proc(local_info_t *local) { - remove_proc_subtree(local->ddev->name, hostap_proc); + proc_remove(local->proc); }