Skip to content

Commit c489800

Browse files
BoardzMasterrleon
authored andcommitted
RDMA/uverbs: Fix typo of sizeof argument
Since size of 'hdr' pointer and '*hdr' structure is equal on 64-bit machines issue probably didn't cause any wrong behavior. But anyway, fixing of typo is required. Fixes: da0f60d ("RDMA/uverbs: Prohibit write() calls with too small buffers") Co-developed-by: Ivanov Mikhail <[email protected]> Signed-off-by: Ivanov Mikhail <[email protected]> Signed-off-by: Konstantin Meskhidze <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
1 parent 8fb8a82 commit c489800

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/infiniband/core/uverbs_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ static ssize_t verify_hdr(struct ib_uverbs_cmd_hdr *hdr,
546546
if (hdr->in_words * 4 != count)
547547
return -EINVAL;
548548

549-
if (count < method_elm->req_size + sizeof(hdr)) {
549+
if (count < method_elm->req_size + sizeof(*hdr)) {
550550
/*
551551
* rdma-core v18 and v19 have a bug where they send DESTROY_CQ
552552
* with a 16 byte write instead of 24. Old kernels didn't

0 commit comments

Comments
 (0)