Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01D39C433EF for ; Mon, 4 Oct 2021 13:28:40 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 60F1C610A5 for ; Mon, 4 Oct 2021 13:28:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 60F1C610A5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A6E1382DA1; Mon, 4 Oct 2021 15:28:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="L+ciyL/8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0FB6382DA1; Mon, 4 Oct 2021 15:28:35 +0200 (CEST) Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 56B8A829FC for ; Mon, 4 Oct 2021 15:28:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x72e.google.com with SMTP id i132so16409959qke.1 for ; Mon, 04 Oct 2021 06:28:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=MV8u/5oicsFPYRwBpP4u+aWAyjnHl3nwyA4XJlQ5erM=; b=L+ciyL/8j2WBEWY6/Ftk79sLqf1Bg2Om/uU37bt9cTWRDXFZ782hgnm28Jkh6BuK8M dCFOs7LflpzQGsrjhMMPxm4GaA2qqV4nowEApVMR0LaPuFTAZZMpG0/UwLj6zC0Eq8bm 33tp1VtABWL8nvGRbrv8D1lvXVxWo5MGp6r4w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=MV8u/5oicsFPYRwBpP4u+aWAyjnHl3nwyA4XJlQ5erM=; b=UQ1p+tucMnDMHLYJonLzWG4buh7XziA/Cm97Lyh47BFW//hG/RqGPwqhCG+DG36FoY DFkL0x8TazHE57eVpKIW93gxIzC0kebjScYq2rhpgZL4PBk+Y/AJlNuNQq2GWViJVswN qEVLH1sZyeeexSBzgz+BYMB8ER1ZY91vmXoTdeV5wgl+7IOu6zHlhFT9qLf+cMG4r7Q/ G5QPC/kjlNfRHyh2BcQ40L+zoG3UvMroZhJg7uiUY05YuKwLpwBz9j929yh7iVFS+ZBp jCfbnrvFPOhY5HNOCFWyd9FrCXsLT+q5y+TxZueXevC+VNcJBBYsT/a2hMnzd2JMISsg xK/g== X-Gm-Message-State: AOAM531aoOWttdK9Zf6Ibhg0movuOU0OA9hRuig17d3hgWazYP8jn6Lz v00S3mmTIND04xegPDFSFcnFVw== X-Google-Smtp-Source: ABdhPJwuOnV/TFk463ukRtNixDOJ8quheeDTGhkfx/17Gw3N/JTxXQkPI4sjO45mgOZcBvWgqCHsaA== X-Received: by 2002:a37:e46:: with SMTP id 67mr10346944qko.272.1633354110169; Mon, 04 Oct 2021 06:28:30 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-ddc6-c860-2365-fdf8.res6.spectrum.com. [2603:6081:7b01:cbda:ddc6:c860:2365:fdf8]) by smtp.gmail.com with ESMTPSA id d24sm7562529qka.7.2021.10.04.06.28.28 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Oct 2021 06:28:29 -0700 (PDT) Date: Mon, 4 Oct 2021 09:28:27 -0400 From: Tom Rini To: Marek Vasut Cc: u-boot@lists.denx.de, Jagan Teki , Vignesh R , Pratyush Yadav Subject: Re: [PATCH] mtd: cqspi: Fix division by zero Message-ID: <20211004132827.GN31748@bill-the-cat> References: <20210914032148.273490-1-marex@denx.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="MGKn9t7FW8AHzDk6" Content-Disposition: inline In-Reply-To: <20210914032148.273490-1-marex@denx.de> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean --MGKn9t7FW8AHzDk6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 14, 2021 at 05:21:48AM +0200, Marek Vasut wrote: > Both dummy.nbytes and dummy.buswidth may be zero. By not checking > the later, it is possible to trigger division by zero and a crash. > This does happen with tiny SPI NOR framework in SPL. Fix this by > adding the check and returning zero dummy bytes in such a case. >=20 > Fixes: 38b0852b0ea ("spi: cadence-qspi: Add support for octal DTR flashes= ") > Signed-off-by: Marek Vasut > Cc: Jagan Teki > Cc: Vignesh R > Cc: Pratyush Yadav Applied to u-boot/master, thanks! --=20 Tom --MGKn9t7FW8AHzDk6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmFbAXAACgkQFHw5/5Y0 tyx3sAv+N/In/zu6DlJ2Dp4GA3jufJdb21P2B1R3F+91Sk2aMHJYZX2u0drVATRA +fthRxFvU/1qBguqYZtwPB9z5lWblxMLFFq7D9r/C9j6yHFAyVuMLwYsEYh7/znI PjEdHeVUut/vsIx16kh7KIeEiwK5LHMVvbBGFJcWTLHx6mpnQ9SkFS6ygyqPaFK4 nplra+MtuNvXBqivvGJNlwAk2LkkXFkfgX41mspV8wEPlYO2RoP43HyI534DiXxz nvOoLRXOmGQXpCFhOH+Gc03jbTwCN8wMt6lWFPTDrP9eDjnMDFus3fCjPcbVYfNQ QBxeCBa90zmlxUIkD3l/TMQeVkzWzpy2XfcJfu6B2Dt60TLIlaoCGhrPbTq4QLPc AWHhyM5aiPgpIuoIAv2R+ynFTJtYvwrxZe5MDGdTMq43dZ6xqmTnF01ni133I0zd XR+aHdPP4TSXMeOspVjNRon1Y9Fx9p8twLS4iZb/sqgW2fN/QjDozQXOlR1rSIsY VEpysUBW =/NCx -----END PGP SIGNATURE----- --MGKn9t7FW8AHzDk6--