[Skiboot-stable] [PATCH] npu2-opencapi: Fix integer promotion bug in LPC allocation

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Mon Dec 9 19:19:01 AEDT 2019


On 9/26/19 6:25 PM, Andrew Donnellan wrote:
> If you try to allocate an amount of LPC memory that's not a power of 2,
> we round the value up to the nearest power of 2.
> 
> By the magic of C, "1 << n" gets treated as an int, even if you're
> assigning it to a uint64_t.
> 
> Change 1 to 1ULL to fix this.
> 
> (C, it's great.)
> 
> Reported-by: Alastair D'Silva <alistair at d-silva.org>
> Cc: skiboot-stable at lists.ozlabs.org


skiboot v6.5.2 stable release contains this fix.


-Vasant




More information about the Skiboot-stable mailing list