linux-next: build failure after merge of the tty tree
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 <[email protected]>
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".
--- drivers/tty/serial/qcom_geni_serial.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/tty/serial/qcom_geni_serial.c +3 -3
@@ -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 ; }
Signature · 5 lines
2.35.1 -- Cheers, Stephen Rothwell
Quoted 68 lines · Stephen Rothwell
Hi all,
After merging the tty tree, today's linux-next build (
x86_64allmodconfig) failed like this:
drivers/tty/serial/qcom_geni_serial.c: In function 'setup_fifos':drivers/tty/serial/qcom_geni_serial.c:1058:17: error: 'structqcom_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: 'structqcom_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: 'structqcom_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: 'structqcom_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 <[email protected]>
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 <[email protected]>--- drivers/tty/serial/qcom_geni_serial.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/tty/serial/qcom_geni_serial.c +3
-4@@ -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
Quoted 3 lines
--
Cheers,
Stephen Rothwell
This looks fine and works fine:
Quoted 69 lines · Bartosz Golaszewski
Quoted 68 lines · Stephen Rothwell
Hi all,
After merging the tty tree, today's linux-next build (
x86_64allmodconfig) failed like this:
drivers/tty/serial/qcom_geni_serial.c: In function 'setup_fifos':drivers/tty/serial/qcom_geni_serial.c:1058:17: error: 'structqcom_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: 'structqcom_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: 'structqcom_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: 'structqcom_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 <[email protected]>
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 <[email protected]>--- drivers/tty/serial/qcom_geni_serial.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/tty/serial/qcom_geni_serial.c +3
-4@@ -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
Quoted 8 lines
Quoted 3 lines
--
Cheers,
Stephen RothwellThis looks fine and works fine:
Reviewed-by Bartosz Golaszewski <[email protected]>Tested-by Bartosz Golaszewski <[email protected]>
Thanks for this, someone else just sent the same thing, I've queued it up too.
greg k-h