crypto: ccp - Get a free page to use while fetching initial nonce
authorMario Limonciello <mario.limonciello@amd.com>
Tue, 29 Aug 2023 15:07:55 +0000 (10:07 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:59:18 +0000 (11:59 +0100)
commit4c2c057d771c956c6a4504a46ed416725bbe50ee
treee0b9945861979801a4dbd57fdd8512f6a172548e
parent93a2477b87e1949e271ffa91d6cc316498ac40e1
crypto: ccp - Get a free page to use while fetching initial nonce

[ Upstream commit 53f7f779f45cbe1771bc4ae05f0320e204a18611 ]

dbc_dev_init() gets a free page from `GFP_KERNEL`, but if that page has
any data in it the first nonce request will fail.
This prevents dynamic boost control from probing. To fix this, explicitly
request a zeroed page with `__GFP_ZERO` to ensure first nonce fetch works.

Fixes: c04cf9e14f10 ("crypto: ccp - Add support for fetching a nonce for dynamic boost control")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/ccp/dbc.c