Re: [PATCH] dmaengine: qcom-adm: fix wrong sizeof config in slave_config
From: Arnd Bergmann
Date: Fri Sep 16 2022 - 08:21:18 EST
On Thu, Sep 15, 2022, at 10:48 PM, Christian Marangi wrote:
> Fix broken slave_config function that uncorrectly compare the
> peripheral_size with the size of the config pointer instead of the size
> of the config struct. This cause the crci value to be ignored and cause
> a kernel panic on any slave that use adm driver.
>
> To fix this, compare to the size of the struct and NOT the size of the
> pointer.
>
> Fixes: 03de6b273805 ("dmaengine: qcom-adm: stop abusing slave_id config")
> Signed-off-by: Christian Marangi <ansuelsmth@xxxxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx # v5.17+
Thanks for the fix,
Reviewed-by: Arnd Bergmann <arnd@xxxxxxxx>
I guess this worked on 64-bit by accident, since both the pointer
and the struct are 8 bytes, but it was clearly wrong and broke
32-bit.
Arnd