Commit 47d87f7
accel/qaic: Add consistent integer overflow checks
The encode_dma() function has integer overflow checks. The
encode_passthrough(), encode_activate() and encode_status() functions
did not. I added integer overflow checking everywhere. I also
updated the integer overflow checking in encode_dma() to use size_add()
so everything is consistent.
Fixes: 129776a ("accel/qaic: Add control path")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Cc: stable@vger.kernel.org # 6.4.x
[jhugo: tweak if in encode_dma() to match existing style]
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ZK0Q7IsPkj6WSCcL@moroto1 parent 51b5638 commit 47d87f7
1 file changed
Lines changed: 4 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
370 | | - | |
| 370 | + | |
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
| |||
558 | 558 | | |
559 | 559 | | |
560 | 560 | | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | 561 | | |
565 | | - | |
| 562 | + | |
566 | 563 | | |
567 | 564 | | |
568 | 565 | | |
| |||
635 | 632 | | |
636 | 633 | | |
637 | 634 | | |
638 | | - | |
| 635 | + | |
639 | 636 | | |
640 | 637 | | |
641 | 638 | | |
| |||
719 | 716 | | |
720 | 717 | | |
721 | 718 | | |
722 | | - | |
| 719 | + | |
723 | 720 | | |
724 | 721 | | |
725 | 722 | | |
| |||
0 commit comments