* [PATCH] staging: axis-fifo: fix integer underflow in tx_fifo_depth
@ 2026-09-22 21:58 Vladan Kalaba
2026-09-23 6:42 ` Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: Vladan Kalaba @ 2026-09-22 21:58 UTC (permalink / raw)
To: gregkh
Cc: ovidiu.panait.oss, gustavopiazdasilva2102, error27,
linux-staging, linux-kernel, Vladan Kalaba, stable
Fix integer underflow if tx_fifo_depth < 4 in axis-fifo.c due
to check in axis_fifo_write() subtracting 4.
Fixes: 52ff2b840bc7 ("staging: axis-fifo: fix maximum TX packet length check")
Cc: stable@vger.kernel.org
Signed-off-by: Vladan Kalaba <vladan.kalaba@gmail.com>
---
drivers/staging/axis-fifo/axis-fifo.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
index 7bb35e11d1dd..066124122caa 100644
--- a/drivers/staging/axis-fifo/axis-fifo.c
+++ b/drivers/staging/axis-fifo/axis-fifo.c
@@ -413,6 +413,11 @@ static int axis_fifo_parse_dt(struct axis_fifo *fifo)
if (ret)
return ret;
+ if (fifo->tx_fifo_depth < 4) {
+ dev_err(fifo->dt_device, "tx_fifo_depth must be >= 4\n");
+ return -EINVAL;
+ }
+
ret = of_property_read_u32(node, "xlnx,use-rx-data",
&fifo->has_rx_fifo);
if (ret)
--
2.53.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: axis-fifo: fix integer underflow in tx_fifo_depth
2026-09-22 21:58 [PATCH] staging: axis-fifo: fix integer underflow in tx_fifo_depth Vladan Kalaba
@ 2026-09-23 6:42 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2026-09-23 6:42 UTC (permalink / raw)
To: Vladan Kalaba
Cc: gregkh, ovidiu.panait.oss, gustavopiazdasilva2102, linux-staging,
linux-kernel, stable
On Tue, Sep 22, 2026 at 11:58:48PM +0200, Vladan Kalaba wrote:
> Fix integer underflow if tx_fifo_depth < 4 in axis-fifo.c due
> to check in axis_fifo_write() subtracting 4.
>
> Fixes: 52ff2b840bc7 ("staging: axis-fifo: fix maximum TX packet length check")
> Cc: stable@vger.kernel.org
> Signed-off-by: Vladan Kalaba <vladan.kalaba@gmail.com>
> ---
This has been sent a number of times before. The information comes
from device tree and we trust the device tree.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-23 6:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-22 21:58 [PATCH] staging: axis-fifo: fix integer underflow in tx_fifo_depth Vladan Kalaba
2026-09-23 6:42 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®