lkml.org 
[lkml]   [2017]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 03/15] NTB: Fix UB/bug in ntb_mw_get_align()


On 05/12/17 03:39 PM, Serge Semin wrote:
> 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>

Looks like you dropped my reviewed by tag for some reason.

Reviewed-by: Logan Gunthorpe <logang@deltatee.com>

\
 
 \ /
  Last update: 2017-12-06 00:39    [W:0.152 / U:2.208 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site