Re: [PATCH] fs/ntfs3: Use kernel ALIGN macros over driver specific

From: Dan Carpenter
Date: Wed Aug 25 2021 - 00:37:49 EST


On Tue, Aug 24, 2021 at 09:20:59PM +0300, Kari Argillander wrote:
> Prefer built in ALIGN macros over special made ones. This can be
> helpful for some static analyzing tools.
>

The patch is fine but the commit message is not clear that this fixes
a runtime bug.

The static checkers (Smatch) were complaining because QuadAlign() was
buggy. If you try to align something higher than UINT_MAX it got
truncated to a u32.

regards,
dan carpenter