From patchwork Tue Sep 21 17:03:39 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Catalin Marinas X-Patchwork-Id: 197642 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8LH3jcK027515 for ; Tue, 21 Sep 2010 17:03:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755294Ab0IURDp (ORCPT ); Tue, 21 Sep 2010 13:03:45 -0400 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:52147 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754985Ab0IURDo (ORCPT ); Tue, 21 Sep 2010 13:03:44 -0400 Received: from cam-owa2.Emea.Arm.com (cam-owa2.emea.arm.com [10.1.105.18]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id o8LH0vF9026368; Tue, 21 Sep 2010 18:00:57 +0100 (BST) Received: from [10.1.77.43] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 21 Sep 2010 18:03:41 +0100 Subject: Re: Stale expression reference causing use-after-free From: Catalin Marinas To: Arnaud Lacombe Cc: "mmarek@suse.cz" , "linux-kbuild@vger.kernel.org" In-Reply-To: References: <1285072379.15732.70.camel@e102109-lin.cambridge.arm.com> Organization: ARM Limited Date: Tue, 21 Sep 2010 18:03:39 +0100 Message-ID: <1285088619.12653.22.camel@e102109-lin.cambridge.arm.com> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 X-OriginalArrivalTime: 21 Sep 2010 17:03:41.0813 (UTC) FILETIME=[F1532250:01CB59AE] Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 21 Sep 2010 17:03:45 +0000 (UTC) diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index 7298806..e43d8d0 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -107,7 +107,8 @@ static struct expr *menu_check_dep(struct expr *e) void menu_add_dep(struct expr *dep) { current_entry->dep = expr_alloc_and(current_entry->dep, menu_check_dep(dep)); - current_entry->dir_dep = current_entry->dep; + current_entry->dir_dep = expr_alloc_and(current_entry->dir_dep, + menu_check_dep(dep)); } void menu_set_type(int type)