Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp3768331ybh; Tue, 6 Aug 2019 01:00:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqw7wgxfbotxRVWyKb1w6coxsaYqzCuJum4ke49NRHaLFXZgkRKhiiUSKdGucRswdJMNaQhg X-Received: by 2002:a17:902:654f:: with SMTP id d15mr1755278pln.253.1565078412646; Tue, 06 Aug 2019 01:00:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565078412; cv=none; d=google.com; s=arc-20160816; b=EhTJrDWQa0E1pj038h6kTAC7TdqYxzke4IwSW+Oq9f/iwiLdJhe/xVHRO2UQAHqgGk 5UK/O8+SW40uJMn3rbgMGVx5ftfPlEYY3/M9EAr0z2qM3TW7pPNweiA8YpdvLBIKOYeE RyoXbVNBb6wHjM/3hEvoWau/6KqomRqyGzd2AA2Ta1F+WPoP3qjndPhwLY8b8sMuqbho /7fDWIjsIPFOtQ6GHb3kbsyNB8IGceXZ8X5vuv6MF9U0KLxTzSuXaSynSx4jyl+oVa3b gu3vMsdP7hpi5Y+Wp4xZwnid9m6ueN5rO9inH8Tkk9Q50pboFtoxKopVgmLiRr5f4jtK /F2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=9FJbS92kWU1LXpsadZeCDBJ4XB4/VZpk1upeU8DquQg=; b=vTN9Jerx+tytn+eE4zfJ+GErlSU/UZqbCoBXwc/e8JnEUDt0pryupIu3K3yPNaMJlH Wqxp33OFnPkI1l/F+46wtgveqjxagDNA/xkVQnIXSU/AykfnX4cEzAYsmOMtJpTgIYc3 9Rx0GqIGK/4sXvRNzk/G/J2gS5qIysJY5v8ouLZHsIYJCkka3XTfHneBkPAk/RX/DNHY n7HBvyVan/XjhqMbddBaUpCmzzRq+lByAFG6iwqK14BS0cFkwDRK5ZMRhlJppjOqtB3G 0Q50vidNJJU/8dC0w3c5lptIBoheUuFz3g3TprZOljSvmaIAmZmkfz5JvDkjTO1vqcXT KaHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ft2d60yt; 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 q1si46452669pgv.58.2019.08.06.00.59.56; Tue, 06 Aug 2019 01:00:12 -0700 (PDT) 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=Ft2d60yt; 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 S1732082AbfHFH64 (ORCPT + 99 others); Tue, 6 Aug 2019 03:58:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:47134 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728056AbfHFH64 (ORCPT ); Tue, 6 Aug 2019 03:58:56 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 18FF12070C; Tue, 6 Aug 2019 07:58:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565078335; bh=h/SZtPXyoVtslJ/aDAxmxK3G7rUocWNqG9K8r9KAwNM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ft2d60yt5RYukvor98l3LO4iOnt5V6kl6XcNkugZHqLca9jwwp57nWooNi9/QcQsK j2V707yx+kFTm773Cp/0B7hSI8zSGkzYrf0XJ6vpP7IxJ2AMAsiQfb8FCU1fwB21kt TzspB5IIf6Jio1QQTkV0f7/kCRboGJvniAReOSNc= Date: Tue, 6 Aug 2019 09:58:53 +0200 From: Greg KH To: chenzefeng Cc: tony.luck@intel.com, fenghua.yu@intel.com, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] ia64:unwind: fix double free for mod->arch.init_unw_table Message-ID: <20190806075853.GA701@kroah.com> References: <1565077593-72480-1-git-send-email-chenzefeng2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1565077593-72480-1-git-send-email-chenzefeng2@huawei.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 06, 2019 at 03:46:33PM +0800, chenzefeng wrote: > The function free_module in file kernel/module.c as follow: > > void free_module(struct module *mod) { > ...... > module_arch_cleanup(mod); > ...... > module_arch_freeing_init(mod); > ...... > } > > Both module_arch_cleanup and module_arch_freeing_init function > would free the mod->arch.init_unw_table, which cause double free. > > Here, set mod->arch.init_unw_table = NULL after remove the unwind > table to avoid double free. > > Signed-off-by: chenzefeng > --- > arch/ia64/kernel/module.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly.