summaryrefslogtreecommitdiffstats
path: root/drivers/ntb
diff options
context:
space:
mode:
authorSerge Semin <fancer.lancer@gmail.com>2017-12-06 15:31:54 +0100
committerJon Mason <jdmason@kudzu.us>2018-01-29 04:17:24 +0100
commitf1678a4c66a5c2cb43f744f7dc7e048d59690166 (patch)
treeab3025b16f95c20f786e988c5eb93feef9f61b57 /drivers/ntb
parentNTB: Set dma mask and dma coherent mask to NTB devices (diff)
downloadlinux-f1678a4c66a5c2cb43f744f7dc7e048d59690166.tar.xz
linux-f1678a4c66a5c2cb43f744f7dc7e048d59690166.zip
NTB: Fix UB/bug in ntb_mw_get_align()
Simple (1 << pidx) operation causes undefined behaviour when pidx >= 32. It must be casted to u64 to match the actual return value of ntb_link_is_up() method, so to have all the possible peer indexes covered and to get rid of undefined behaviour. Additionally there are special macros in "linux/bitops.h" to perform the bit-set-shift operations, so it's recommended to have them used for proper bit setting. Signed-off-by: Serge Semin <fancer.lancer@gmail.com> Reviewed-by: Logan Gunthorpe <logang@deltatee.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'drivers/ntb')
0 files changed, 0 insertions, 0 deletions