Message ID | 20230123131818.2785f4e8@canb.auug.org.au |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1395096wrn; Sun, 22 Jan 2023 18:42:53 -0800 (PST) X-Google-Smtp-Source: AMrXdXt0/6tIkJPUyZqya8gjzMhlhSsII7KlUO9SAt0QbggN85Iv7+Zmeq1TvS9ZG+qAyTbRoe9d X-Received: by 2002:a17:906:d20f:b0:84d:4d6c:a462 with SMTP id w15-20020a170906d20f00b0084d4d6ca462mr21525621ejz.25.1674441773365; Sun, 22 Jan 2023 18:42:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674441773; cv=none; d=google.com; s=arc-20160816; b=s3dz4AtsZiXNMnjJKDmBBSd8WiINC2WcO69NF2AC8Nzdv8gnlyNyuVJp8ldXM4naPa Ip7DjUkqamT9rpMorrH3owasHyVP6qETaNFCFUmzqO03k1yaRU5tLXeZ7qtNS2i2QQp1 IRuPVB4HWSqlXUJS+HQshcXazevuvOcCKG3DCL/pRAOammCqXIGh+n4rSsgqiIvt7vHj gjSkxmJfsUXE6cmExGGKJK7Ofbo7M0ey83ig4I97lWOHpmEInIP/6IqrQDyIQ+RYUELT BFqDSzfIVFB7j/bIDjX8tackCqyO80EG438wwtr/9NobaD5AXanFELbbGyRvNO4D4KHZ R8HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=CxYqtpt/pJCUXQBlKHHgtAfFQj3OCZMzJNeA2PIf5PM=; b=KlE0MSeveXYBhN4FHiKKBCyuI7i9ZZPtRMiCi57fVidkEq8bhBHYIJC2LjLLc5EAXj MTRe54GmOPpAXJ27jPqEZ0nyjcxrC1hBg0JVKws5a6FAA5pFlCuEGjDd3eVQOCE2b+WE hnHZ8xDFUtJrWbra+bzfBIU8mrBt/PGA37dAWy6EIrjnr5J+E4JabjJxHw+QuusQO+sP tZqQ75VTETbhrRyAtAWMsBkgLvh8PZda1gCcYMCybvWXU8KsaRzQiazHra7we3TyDcQ9 NGmSPLIoPpnGyWn6fIwb2Ouzopaf/6qx2QDQ5T6vnYZd39h5I/yJ0bNw3xcClwGit1Qz +d/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=Xv1MW7AQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s3-20020a17090699c300b008626e197ac4si24298502ejn.975.2023.01.22.18.42.29; Sun, 22 Jan 2023 18:42:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=Xv1MW7AQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230487AbjAWCSZ (ORCPT <rfc822;forouhar.linux@gmail.com> + 99 others); Sun, 22 Jan 2023 21:18:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229836AbjAWCSY (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 22 Jan 2023 21:18:24 -0500 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFE26144BC; Sun, 22 Jan 2023 18:18:21 -0800 (PST) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4P0Yg01ZKlz4xyd; Mon, 23 Jan 2023 13:18:20 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1674440300; bh=CxYqtpt/pJCUXQBlKHHgtAfFQj3OCZMzJNeA2PIf5PM=; h=Date:From:To:Cc:Subject:From; b=Xv1MW7AQcgKMD7z5ch53QWxfNdtA5Y62hystEzhCc2CvQaCBGwK4DbjfYSGWchG07 eSGF2KgQAvw+64fJCoQJl7J79O3clqV889g+CHyfn1CvlJNLwCGFIbxrT9HzGtP6UQ pgxIcgniwhmSeBKrllYeHHuvOhKVqM3RZ3HUt1q4SFaQJpJXvUeGN+outoZdxRxG4i 5vySAOM1t7+PmDm+BcdzGevtX0+F4WMOrKJdnyTeaUvM8rMfBXxkOFyrudgQ4fZrbb 5QdlA3cK3Eyx2UXn8bog3GtiTtDaJ8qdTTCe7FETbjxD05VZz04C50RNbf8QoV3z37 Zd8KQwCj1WrgQ== Date: Mon, 23 Jan 2023 13:18:18 +1100 From: Stephen Rothwell <sfr@canb.auug.org.au> To: Greg KH <greg@kroah.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Bartosz Golaszewski <bartosz.golaszewski@linaro.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Linux Next Mailing List <linux-next@vger.kernel.org> Subject: linux-next: build failure after merge of the tty tree Message-ID: <20230123131818.2785f4e8@canb.auug.org.au> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/p1p/vaXsSc+vE6pY.3o34IZ"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755779456750426188?= X-GMAIL-MSGID: =?utf-8?q?1755779456750426188?= |
Series |
linux-next: build failure after merge of the tty tree
|
|
Commit Message
Stephen Rothwell
Jan. 23, 2023, 2:18 a.m. UTC
Hi all, After merging the tty tree, today's linux-next build (x86_64 allmodconfig) failed like this: drivers/tty/serial/qcom_geni_serial.c: In function 'setup_fifos': drivers/tty/serial/qcom_geni_serial.c:1058:17: error: 'struct qcom_geni_serial_port' has no member named 'rx_fifo' 1058 | if (port->rx_fifo && (old_rx_fifo_depth != port->rx_fifo_depth) && port->rx_fifo_depth) { | ^~ drivers/tty/serial/qcom_geni_serial.c:1059:21: error: 'struct qcom_geni_serial_port' has no member named 'rx_fifo' 1059 | port->rx_fifo = devm_krealloc(uport->dev, port->rx_fifo, | ^~ drivers/tty/serial/qcom_geni_serial.c:1059:63: error: 'struct qcom_geni_serial_port' has no member named 'rx_fifo' 1059 | port->rx_fifo = devm_krealloc(uport->dev, port->rx_fifo, | ^~ drivers/tty/serial/qcom_geni_serial.c:1062:26: error: 'struct qcom_geni_serial_port' has no member named 'rx_fifo' 1062 | if (!port->rx_fifo) | ^~ Caused by commit 2aaa43c70778 ("tty: serial: qcom-geni-serial: add support for serial engine DMA") interacting with commit b8caf69a6946 ("tty: serial: qcom-geni-serial: fix slab-out-of-bounds on RX FIFO buffer") from Linus' tree. I have applied the following merge fix patch for today (I am not sure if it is actually correct, but it builds). From: Stephen Rothwell <sfr@canb.auug.org.au> Date: Mon, 23 Jan 2023 13:09:27 +1100 Subject: [PATCH] tty: fix up for "tty: serial: qcom-geni-serial: add support for serial engine DMA" interacting with "tty: serial: qcom-geni-serial: fix slab-out-of-bounds on RX FIFO buffer". Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> --- drivers/tty/serial/qcom_geni_serial.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Comments
On Mon, 23 Jan 2023 at 03:18, Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > Hi all, > > After merging the tty tree, today's linux-next build (x86_64 allmodconfig) > failed like this: > > drivers/tty/serial/qcom_geni_serial.c: In function 'setup_fifos': > drivers/tty/serial/qcom_geni_serial.c:1058:17: error: 'struct qcom_geni_serial_port' has no member named 'rx_fifo' > 1058 | if (port->rx_fifo && (old_rx_fifo_depth != port->rx_fifo_depth) && port->rx_fifo_depth) { > | ^~ > drivers/tty/serial/qcom_geni_serial.c:1059:21: error: 'struct qcom_geni_serial_port' has no member named 'rx_fifo' > 1059 | port->rx_fifo = devm_krealloc(uport->dev, port->rx_fifo, > | ^~ > drivers/tty/serial/qcom_geni_serial.c:1059:63: error: 'struct qcom_geni_serial_port' has no member named 'rx_fifo' > 1059 | port->rx_fifo = devm_krealloc(uport->dev, port->rx_fifo, > | ^~ > drivers/tty/serial/qcom_geni_serial.c:1062:26: error: 'struct qcom_geni_serial_port' has no member named 'rx_fifo' > 1062 | if (!port->rx_fifo) > | ^~ > > Caused by commit > > 2aaa43c70778 ("tty: serial: qcom-geni-serial: add support for serial engine DMA") > > interacting with commit > > b8caf69a6946 ("tty: serial: qcom-geni-serial: fix slab-out-of-bounds on RX FIFO buffer") > > from Linus' tree. > > I have applied the following merge fix patch for today (I am not sure > if it is actually correct, but it builds). > > From: Stephen Rothwell <sfr@canb.auug.org.au> > Date: Mon, 23 Jan 2023 13:09:27 +1100 > Subject: [PATCH] tty: fix up for "tty: serial: qcom-geni-serial: add support > for serial engine DMA" > > interacting with "tty: serial: qcom-geni-serial: fix slab-out-of-bounds > on RX FIFO buffer". > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> > --- > drivers/tty/serial/qcom_geni_serial.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c > index d98e0a8aae7c..61350007bf1c 100644 > --- a/drivers/tty/serial/qcom_geni_serial.c > +++ b/drivers/tty/serial/qcom_geni_serial.c > @@ -1055,11 +1055,11 @@ static int setup_fifos(struct qcom_geni_serial_port *port) > uport->fifosize = > (port->tx_fifo_depth * port->tx_fifo_width) / BITS_PER_BYTE; > > - if (port->rx_fifo && (old_rx_fifo_depth != port->rx_fifo_depth) && port->rx_fifo_depth) { > - port->rx_fifo = devm_krealloc(uport->dev, port->rx_fifo, > + if (port->rx_buf && (old_rx_fifo_depth != port->rx_fifo_depth) && port->rx_fifo_depth) { > + port->rx_buf = devm_krealloc(uport->dev, port->rx_buf, > port->rx_fifo_depth * sizeof(u32), > GFP_KERNEL); > - if (!port->rx_fifo) > + if (!port->rx_buf) > return -ENOMEM; > } > > -- > 2.35.1 > > -- > Cheers, > Stephen Rothwell This looks fine and works fine: Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Tested-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
On Mon, Jan 23, 2023 at 10:46:28AM +0100, Bartosz Golaszewski wrote: > On Mon, 23 Jan 2023 at 03:18, Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > > > Hi all, > > > > After merging the tty tree, today's linux-next build (x86_64 allmodconfig) > > failed like this: > > > > drivers/tty/serial/qcom_geni_serial.c: In function 'setup_fifos': > > drivers/tty/serial/qcom_geni_serial.c:1058:17: error: 'struct qcom_geni_serial_port' has no member named 'rx_fifo' > > 1058 | if (port->rx_fifo && (old_rx_fifo_depth != port->rx_fifo_depth) && port->rx_fifo_depth) { > > | ^~ > > drivers/tty/serial/qcom_geni_serial.c:1059:21: error: 'struct qcom_geni_serial_port' has no member named 'rx_fifo' > > 1059 | port->rx_fifo = devm_krealloc(uport->dev, port->rx_fifo, > > | ^~ > > drivers/tty/serial/qcom_geni_serial.c:1059:63: error: 'struct qcom_geni_serial_port' has no member named 'rx_fifo' > > 1059 | port->rx_fifo = devm_krealloc(uport->dev, port->rx_fifo, > > | ^~ > > drivers/tty/serial/qcom_geni_serial.c:1062:26: error: 'struct qcom_geni_serial_port' has no member named 'rx_fifo' > > 1062 | if (!port->rx_fifo) > > | ^~ > > > > Caused by commit > > > > 2aaa43c70778 ("tty: serial: qcom-geni-serial: add support for serial engine DMA") > > > > interacting with commit > > > > b8caf69a6946 ("tty: serial: qcom-geni-serial: fix slab-out-of-bounds on RX FIFO buffer") > > > > from Linus' tree. > > > > I have applied the following merge fix patch for today (I am not sure > > if it is actually correct, but it builds). > > > > From: Stephen Rothwell <sfr@canb.auug.org.au> > > Date: Mon, 23 Jan 2023 13:09:27 +1100 > > Subject: [PATCH] tty: fix up for "tty: serial: qcom-geni-serial: add support > > for serial engine DMA" > > > > interacting with "tty: serial: qcom-geni-serial: fix slab-out-of-bounds > > on RX FIFO buffer". > > > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> > > --- > > drivers/tty/serial/qcom_geni_serial.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c > > index d98e0a8aae7c..61350007bf1c 100644 > > --- a/drivers/tty/serial/qcom_geni_serial.c > > +++ b/drivers/tty/serial/qcom_geni_serial.c > > @@ -1055,11 +1055,11 @@ static int setup_fifos(struct qcom_geni_serial_port *port) > > uport->fifosize = > > (port->tx_fifo_depth * port->tx_fifo_width) / BITS_PER_BYTE; > > > > - if (port->rx_fifo && (old_rx_fifo_depth != port->rx_fifo_depth) && port->rx_fifo_depth) { > > - port->rx_fifo = devm_krealloc(uport->dev, port->rx_fifo, > > + if (port->rx_buf && (old_rx_fifo_depth != port->rx_fifo_depth) && port->rx_fifo_depth) { > > + port->rx_buf = devm_krealloc(uport->dev, port->rx_buf, > > port->rx_fifo_depth * sizeof(u32), > > GFP_KERNEL); > > - if (!port->rx_fifo) > > + if (!port->rx_buf) > > return -ENOMEM; > > } > > > > -- > > 2.35.1 > > > > -- > > Cheers, > > Stephen Rothwell > > This looks fine and works fine: > > Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > Tested-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Thanks for this, someone else just sent the same thing, I've queued it up too. greg k-h
diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c index d98e0a8aae7c..61350007bf1c 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -1055,11 +1055,11 @@ static int setup_fifos(struct qcom_geni_serial_port *port) uport->fifosize = (port->tx_fifo_depth * port->tx_fifo_width) / BITS_PER_BYTE; - if (port->rx_fifo && (old_rx_fifo_depth != port->rx_fifo_depth) && port->rx_fifo_depth) { - port->rx_fifo = devm_krealloc(uport->dev, port->rx_fifo, + if (port->rx_buf && (old_rx_fifo_depth != port->rx_fifo_depth) && port->rx_fifo_depth) { + port->rx_buf = devm_krealloc(uport->dev, port->rx_buf, port->rx_fifo_depth * sizeof(u32), GFP_KERNEL); - if (!port->rx_fifo) + if (!port->rx_buf) return -ENOMEM; }