Now we support sharing one big page when PAGE_SIZE is not equal 4096.
4096 bytes is the default stripe size. To support this it adds a
page offset array in raid5_percpu's scribble. It passes the page
offset array to async_xor_offs. But there are some users that don't
use the page offset array. In raid5-ppl.c, async_xor passes NULL to
asynx_xor_offs. So it needs to check src_offs is NULL or not.
Fixes: ceaf2966ab08(async_xor: increase src_offs when dropping destination page)
Reported-by: Oleksandr Shchirskyi <redacted>
Signed-off-by: Xiao Ni <redacted>
---
crypto/async_tx/async_xor.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
From: Song Liu <song@kernel.org> Date: 2021-05-31 22:53:54
On Thu, May 27, 2021 at 11:16 PM Xiao Ni [off-list ref] wrote:
Now we support sharing one big page when PAGE_SIZE is not equal 4096.
4096 bytes is the default stripe size. To support this it adds a
page offset array in raid5_percpu's scribble. It passes the page
offset array to async_xor_offs. But there are some users that don't
use the page offset array. In raid5-ppl.c, async_xor passes NULL to
asynx_xor_offs. So it needs to check src_offs is NULL or not.
Fixes: ceaf2966ab08(async_xor: increase src_offs when dropping destination page)
Reported-by: Oleksandr Shchirskyi <redacted>
Signed-off-by: Xiao Ni <redacted>
Oleksandr,
Could you please verify this fixes the issue, and reply with your Tested-by?
Thanks,
Song
On Thu, May 27, 2021 at 11:16 PM Xiao Ni [off-list ref] wrote:
quoted
Now we support sharing one big page when PAGE_SIZE is not equal 4096.
4096 bytes is the default stripe size. To support this it adds a
page offset array in raid5_percpu's scribble. It passes the page
offset array to async_xor_offs. But there are some users that don't
use the page offset array. In raid5-ppl.c, async_xor passes NULL to
asynx_xor_offs. So it needs to check src_offs is NULL or not.
Fixes: ceaf2966ab08(async_xor: increase src_offs when dropping destination page)
Reported-by: Oleksandr Shchirskyi <redacted>
Signed-off-by: Xiao Ni <redacted>
Oleksandr,
Could you please verify this fixes the issue, and reply with your Tested-by?
Thanks,
Song
I can confirm that this patch fixes a NULL pointer dereference issue for me.
Thanks for the fix!
Tested-by: Oleksandr Shchirskyi <redacted>