git: 5f5d5abc37d0 - stable/14 - ocf_fc: Fix up max() usage
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 03 Nov 2026 09:00:17 UTC
The branch stable/14 has been updated by ram:
URL: https://cgit.FreeBSD.org/src/commit/?id=5f5d5abc37d096264c1bb33feb8f9ea62c4f3000
commit 5f5d5abc37d096264c1bb33feb8f9ea62c4f3000
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-10-27 16:47:19 +0000
Commit: Ram Kishore Vegesna <ram@FreeBSD.org>
CommitDate: 2026-11-03 08:58:57 +0000
ocf_fc: Fix up max() usage
max() truncates its parameters to 32-bit integers.
Reviewed by: ram
Sponsored by: The FreeBSD Foundation
Fixes: 26081296b244 ("ocs_fc: Harden ioctl, XRI lookup and FCP command validation")
(cherry picked from commit 9b6b3a36ee295dc6edd0e00aa34adaebaed98c7d)
---
sys/dev/ocs_fc/ocs_ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/dev/ocs_fc/ocs_ioctl.c b/sys/dev/ocs_fc/ocs_ioctl.c
index 18dd3fbbac4c..9193f4168c5a 100644
--- a/sys/dev/ocs_fc/ocs_ioctl.c
+++ b/sys/dev/ocs_fc/ocs_ioctl.c
@@ -194,7 +194,7 @@ ocs_process_sli_config (ocs_t *ocs, ocs_ioctl_elxu_mbox_t *mcmd, ocs_dma_t *dma)
break;
}
} else {
- uint64_t max_bytes = max(mcmd->in_bytes, mcmd->out_bytes);
+ uint64_t max_bytes = MAX(mcmd->in_bytes, mcmd->out_bytes);
if (max_bytes > OCS_MAX_DMA_ALLOC) {
device_printf(ocs->dev, "%s: non-embedded - %llu exceeds max\n",
__func__, (unsigned long long)max_bytes);