Message ID | 20200111094848.177582237@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=JpBV=3A=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74540C33CA4 for <stable@archiver.kernel.org>; Sat, 11 Jan 2020 09:55:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4121B2072E for <stable@archiver.kernel.org>; Sat, 11 Jan 2020 09:55:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578736534; bh=CML4ynmYXN0xB1zt3WrGElGGQONxilXaUfFuXX/uags=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=JqSguKM1sq89Ji7nEd2nlcP8QJg3YGHyNz8jI4QHLN232R9S1VeI81raXntobAvTJ 4WriiOFwfjDpVOH41arwb3eLFOewRRn/6/t3jy/dh40FrmevyyVuhlX8487vJfo4Tw EU1//sqfzMYWW+tVZWWjH8JavXqcFbUuvzrFZFkI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729078AbgAKJza (ORCPT <rfc822;stable@archiver.kernel.org>); Sat, 11 Jan 2020 04:55:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:45520 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729073AbgAKJza (ORCPT <rfc822;stable@vger.kernel.org>); Sat, 11 Jan 2020 04:55:30 -0500 Received: from localhost (unknown [62.119.166.9]) (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 06CF42077C; Sat, 11 Jan 2020 09:55:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578736529; bh=CML4ynmYXN0xB1zt3WrGElGGQONxilXaUfFuXX/uags=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lYsLkWFBJXQbOM9+W54CSGGX9XwIBQYM6A+jlLDQNYOM/k7OLckoJZwB6oDlVuLoA REvxJBZTS4GnnKIzBYeRmyBVh8OL6wnQ6F+O+gEhFccgSoJIlyyjm+wdhY3b06Ljto 147qeMhldEWuDUJkStiO3FzU8yBYou9cVOQgafT8= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Thomas Hebb <tommyhebb@gmail.com>, Masahiro Yamada <masahiroy@kernel.org>, Sasha Levin <sashal@kernel.org> Subject: [PATCH 4.4 46/59] kconfig: dont crash on NULL expressions in expr_eq() Date: Sat, 11 Jan 2020 10:49:55 +0100 Message-Id: <20200111094848.177582237@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200111094835.417654274@linuxfoundation.org> References: <20200111094835.417654274@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c index ed29bad1f03a..96420b620963 100644 --- a/scripts/kconfig/expr.c +++ b/scripts/kconfig/expr.c @@ -201,6 +201,13 @@ static int expr_eq(struct expr *e1, struct expr *e2) { int res, old_count; + /* + * A NULL expr is taken to be yes, but there's also a different way to + * represent yes. expr_is_yes() checks for either representation. + */ + if (!e1 || !e2) + return expr_is_yes(e1) && expr_is_yes(e2); + if (e1->type != e2->type) return 0; switch (e1->type) {