Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8126074imu; Tue, 4 Dec 2018 03:27:19 -0800 (PST) X-Google-Smtp-Source: AFSGD/VYvSulb7CfZg6b7Sp+oDY/a4Np/LIkSH8inxvbSw2XZx8dfneIMgpI2sihszbtGEmLjwby X-Received: by 2002:a62:509b:: with SMTP id g27mr19920614pfj.48.1543922839335; Tue, 04 Dec 2018 03:27:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543922839; cv=none; d=google.com; s=arc-20160816; b=o3uzv2lyCzw+WkpDCkG53xU65/lRLLIUF5+D4HRuxTgtsJPm9roc7ZIKRfzI1l7qXF kzo/m2duiVvzDTIQGty4PHFnx7x5nkzMDyrUgVXsoX/9eYe/AjXgxnVedO/HxvaIkjJF G1b51jPoPcSUnjDsQMHG7bhlRAKQ3r3+TdoaY6Na4B1B9c/i9MjE68+5jFkonBnwuJbW YXe7NDuqld3tECRU3yR4VSMj0DAGVIhD3uDuIOjwCOJ27rotHFAdTdN1LlsX8Aa/Qq// nRqtfRFM38cgIZFkcTvOKcqjPRrMTzwLGjuyrhYCkJ26a2ICBL/4dWhejfsvRiUDtHr2 0yPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xvFJz3O4F9w7LPA6mQm1ve9wq6YVi/24pD6gmtsxMcA=; b=lepqWgIu9u9sBTGzLqv3Yx6JOOgrfjsRjwTG1iB6ByJIpe0miRGVRyNQDu3Pavi+cV 02XWp25LVG0RK8jSp+i3a9t1WH8ZWNUdWZRG01MJ8XPp+AzrVou1v/gUGnz+uCMZ/Di3 BxPfYeEvWba2u62SN2PbK3DxG95gAPgZQLzgpseywpzpqpgCUM/qSeWql7mQC2VlTz1e v3q1n8JjlBX4i3kifa9WTMko8exhJQB+scJAIujd2m5hSAdgtwwRMWIpAW70mtevKOnE rVheCya4eaPlbBf8iS1nnN6ZBy3L50tTAl2BaAaBGIYa/cM9a7qoLBjH0Vnpycq5FP7y 1DPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hBuNxx96; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m10si16735859plt.295.2018.12.04.03.27.04; Tue, 04 Dec 2018 03:27:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hBuNxx96; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727267AbeLDLZY (ORCPT + 99 others); Tue, 4 Dec 2018 06:25:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:45992 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727335AbeLDLAl (ORCPT ); Tue, 4 Dec 2018 06:00:41 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F1322214D9; Tue, 4 Dec 2018 11:00:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543921241; bh=AHOfwddBoQWUYDNztiavgQlQ5Un3/PgXmZfI+G4LrnI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hBuNxx96x8hFpoOz0jJveURyWcx5TYrKE9Rhu5o8P2XfA0RkW10A9O07Fx9s2yL43 0TPChdSP3vVkVnSVg45aMcTCOu/h68CIm5iukN22PqSHptm+Q/CMRCORU9sLfTJE4l gTrcVeSchDD+IWmbTFsH1s2LgXamHsQWUtnQN6Lc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Luis Chamberlain , Randy Dunlap , Andrew Morton , Linus Torvalds Subject: [PATCH 4.19 135/139] lib/test_kmod.c: fix rmmod double free Date: Tue, 4 Dec 2018 11:50:16 +0100 Message-Id: <20181204103656.387823871@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181204103649.950154335@linuxfoundation.org> References: <20181204103649.950154335@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Luis Chamberlain commit 5618cf031fecda63847cafd1091e7b8bd626cdb1 upstream. We free the misc device string twice on rmmod; fix this. Without this we cannot remove the module without crashing. Link: http://lkml.kernel.org/r/20181124050500.5257-1-mcgrof@kernel.org Signed-off-by: Luis Chamberlain Reported-by: Randy Dunlap Reviewed-by: Andrew Morton Cc: [4.12+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- lib/test_kmod.c | 1 - 1 file changed, 1 deletion(-) --- a/lib/test_kmod.c +++ b/lib/test_kmod.c @@ -1214,7 +1214,6 @@ void unregister_test_dev_kmod(struct kmo dev_info(test_dev->dev, "removing interface\n"); misc_deregister(&test_dev->misc_dev); - kfree(&test_dev->misc_dev.name); mutex_unlock(&test_dev->config_mutex); mutex_unlock(&test_dev->trigger_mutex);