Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3026201pxk; Mon, 7 Sep 2020 00:26:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhj5nOdFJ+5dRwbWyMzGYe1f4hPpPM1cIKuBkhDmsLj/3LBTbmNIyPZrZaNViDakT/CrDt X-Received: by 2002:a17:906:4151:: with SMTP id l17mr21217951ejk.116.1599463572552; Mon, 07 Sep 2020 00:26:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599463572; cv=none; d=google.com; s=arc-20160816; b=snXe3Cq7TXy2rQWIArOHMW5QqUfdkFuCLnKbTgoLti/mrIAiaYINPdA5vcfwF5dJ1q Kolth9PE9mc+d99CX9Au9SL0xLiIDZmsOh9NXigfdZvNNvx9nI3KRtnYux9t20lWKkZi 7r/1mHK8brUAb/42e2RlCek6TLx9kDn6N4K/EVts1NeWMSMu4DW9tHNVyHSXaDhmlh2m dBK4mFqwfmud4LMjO056/Gh4LlrAZfPOTExdbKAM3lwCaZiyodjjGweRzOLrml9aTrWn 67vy24scwvDrM/ANR9m4j8ugMePjYjChlr7PqIY5iiTQxSapMQO+32wY8aYsYFGhqG/t ZUCA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=xMd7UMUIr7+/Hql+GVTh9a1SbKt+oLrI5OUTWryFUlQ=; b=aDT2LHysJBxWdgrbFYQ9XqWR6g82N5NmL3f5mziHojPhRpczHVkx7PGN05YzF2jUMn uCszVbdYOET/eujps9riSg9WXQ4/SNbyXxNrP1kmlBF4iJSYpxFMPKUcasx690/xdhgZ GAgWQJLIbaZnM+OcOt7y1C2bVjxtbJqbEz9BKFi2kkCZUcyTcJJQNwM7V318amUyzRts g4TmgFbVjoSHi/jXDDYywzckCqW9+cER0uDbuJs6vvQT+F8tQg5iKitfxLvOAyAW2XWl KSCH5plpkLWe6i5b5gJDJ0O+/QceEKKMP48Pj+IGfJURVL2NX2mFhF7ANTrVTTKnxcAB aCtQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lc19si9680081ejb.192.2020.09.07.00.25.50; Mon, 07 Sep 2020 00:26:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727071AbgIGHWg (ORCPT + 99 others); Mon, 7 Sep 2020 03:22:36 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:56075 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727066AbgIGHWe (ORCPT ); Mon, 7 Sep 2020 03:22:34 -0400 X-Originating-IP: 91.224.148.103 Received: from localhost.localdomain (unknown [91.224.148.103]) (Authenticated sender: miquel.raynal@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 8F0596000B; Mon, 7 Sep 2020 07:22:31 +0000 (UTC) From: Miquel Raynal To: Christophe Kerello , miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, dan.carpenter@oracle.com, linux-stm32@st-md-mailman.stormreply.com Subject: Re: [PATCH] mtd: rawnand: stm32_fmc2: fix a buffer overflow Date: Mon, 7 Sep 2020 09:22:30 +0200 Message-Id: <20200907072230.3755-1-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <1595325127-32693-1-git-send-email-christophe.kerello@st.com> References: MIME-Version: 1.0 X-linux-mtd-patch-notification: thanks X-linux-mtd-patch-commit: 1151667d17038c4c498ac75e13813a53a5166806 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2020-07-21 at 09:52:07 UTC, Christophe Kerello wrote: > This patch solves following static checker warning: > drivers/mtd/nand/raw/stm32_fmc2_nand.c:350 stm32_fmc2_nfc_select_chip() > error: buffer overflow 'nfc->data_phys_addr' 2 <= 2 > > The CS value can only be 0 or 1. > > Signed-off-by: Christophe Kerello > Fixes: 2cd457f328c1 ("mtd: rawnand: stm32_fmc2: add STM32 FMC2 NAND flash controller driver") Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks. Miquel