Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1455221ybp; Fri, 4 Oct 2019 15:17:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqyM2zu+Um33OFeA+K/zRDqkG9OZOU98lsrDcSDHiS3zO1kxqvdFGjbcx6OMzWptjaQTPrOc X-Received: by 2002:a17:906:4d8d:: with SMTP id s13mr14416644eju.5.1570227470033; Fri, 04 Oct 2019 15:17:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570227470; cv=none; d=google.com; s=arc-20160816; b=lyKcaCdFPPQcAPFQghFyav/JIfKqrpmcB+6xcsCIVhHEjxB50EdN1J3Bj5si/88nrI +fY+R9HwUKA/nH9YsEgTGTknHH0/47DhEr0XSmh/zs27ip8EAdMY45vDRs5mHDaViNlI ugpW8VO39qFsCooHxLBc2jk1Y/cmPNpkY+1sLinCNCKpojy+/NhfEEZofJZO7IYnz74z 3ox5Q1AoHCl0s/Hn2PbNFwVt4g9lBzbuK96eg2LQ2mzdrCDGy1/Ftf8j5M7yBYqFqBt0 KzJkB7NTLCufRVQOZFDEpqB1UW+8UsBcFRS6mYjgbe3pNwCmi8KlJovFwhGD0szeJg5w 2tYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=S8mPVffMcLGte/wHbtTKmdFyoHNnsyDaHZetmGYETyI=; b=w9ekA3x5iE9R1tJIDTHbkf92WZSOypcFzYMqrRUG/NEQ7vTPuM2o9euac6/SZmADQE wbcWI8CXUOIDo0/LUzXH/aROtdTtLdtPpItZbDmVe4UuAlAlZqBuS/TWVqvk6scfx2OG kixXXL8XmAnRa3EbCN9dRA9yk5uaOULqsgUREnucFsOXjE/37ArfGRDeEc/OOgk9v72W HATQfL+8j66wNS1nLgukN/yDpSsLS8MnbpsFFbqiy8rQhwPlQeF86eoMQenGSqAVQVFG ciYNx8vZNP6xH21e4rOXlQwGbhocN4OARhnqIHmAEDmrnkioemJLKxIjonKrtFDn43AH 6pYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qbrJI1nS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v20si4199932edq.195.2019.10.04.15.17.24; Fri, 04 Oct 2019 15:17:50 -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=@linaro.org header.s=google header.b=qbrJI1nS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731447AbfJDWO2 (ORCPT + 99 others); Fri, 4 Oct 2019 18:14:28 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:46826 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728841AbfJDWO1 (ORCPT ); Fri, 4 Oct 2019 18:14:27 -0400 Received: by mail-lf1-f67.google.com with SMTP id t8so5456464lfc.13 for ; Fri, 04 Oct 2019 15:14:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=S8mPVffMcLGte/wHbtTKmdFyoHNnsyDaHZetmGYETyI=; b=qbrJI1nS7K2Rd321FJnk6g/mCczAUiwrknzRclj4Ij1aTcpmviFEYrfD0bKA/tr6F+ 92kQ3oj4e6DANBZ1g4S+Z2SaNunY0/B0+WMh6sjxkeKvdI9ZL7BYHLqC+xf6ahRkbkHC Y4kOqhN6PadJfxjDZY2BVnZSbJ6q8Zk5/1eDJZ60H8AvaTlzhRXkd6WBMfkyCJIZCF4I sj0HLAoUoAmgwfy1odnZQalxEUZnfZUZotctVciJcG0IYdkDAAUUDVPPEA0+lVOqk08s nHpbsoTlSwvca3bjTfZox6FD74uthGrjxcHRB9+ACZ7D6Re8IuqZy0lyim9cAug6FoMg nZrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=S8mPVffMcLGte/wHbtTKmdFyoHNnsyDaHZetmGYETyI=; b=Hf/bBW6ENba2/Ii3dNFm2onCRVxD4MBFZ4gsGf4+GPf28Rqa3SyV4fXwUO7Th23E9z LJ9ykcEOtm91jGi4RclfVHettpvnIpnbf5155vRCODe7GoJUDmUGQAfuX1eBLz5+kN1o AZ4uCaniYDTmC6gcweoSrFxffi2Sp1Tz3NVcr0o5XS4NRcsp0OxqSe/CY/sJbVsTGQF9 RrjK/wCR2e8vp7sbXuPkFSKfNOPcfeVh+GRqGOuRkvmlBWKpxSOGo++O8LKs+aRq1SME 4JYsoANCrv1hZQxTUUhdKakEr13LcVMsmTSRzIBCQTE6o52hJnbuoV7galOFShrVe7OS ELJg== X-Gm-Message-State: APjAAAV9XoO+xgIpBBP0SRgox9nTyqtr68CYQU4pn7ydwHs0A+xkY1WG DzxxdcucKBMbdM/58s+3lbL6ZZlKyOMQb6r7x3JE0w== X-Received: by 2002:a19:14f:: with SMTP id 76mr9883809lfb.92.1570227265893; Fri, 04 Oct 2019 15:14:25 -0700 (PDT) MIME-Version: 1.0 References: <20190926081426.GB2332@mwanda> In-Reply-To: <20190926081426.GB2332@mwanda> From: Linus Walleij Date: Sat, 5 Oct 2019 00:14:14 +0200 Message-ID: Subject: Re: [PATCH] ns2: Fix off by one bugs in ns2_pinmux_enable() To: Dan Carpenter Cc: Ray Jui , Yendapally Reddy Dhananjaya Reddy , Scott Branden , bcm-kernel-feedback-list , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" , kernel-janitors@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 26, 2019 at 10:14 AM Dan Carpenter wrote: > The pinctrl->functions[] array has pinctrl->num_functions elements and > the pinctrl->groups[] array is the same way. These are set in > ns2_pinmux_probe(). So the > comparisons should be >= so that we don't > read one element beyond the end of the array. > > Fixes: b5aa1006e4a9 ("pinctrl: ns2: add pinmux driver support for Broadcom NS2 SoC") > Signed-off-by: Dan Carpenter Patch applied with Scott's ACK. Yours, Linus Walleij