Commit ae04342b authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Vinod Koul
Browse files

dmaengine: avoid non-constant format string



Using an arbitrary string as a printf-style format can be a security
problem if that string contains % characters, as the optionalal
-Wformat-security flag points out:

drivers/dma/dmaengine.c: In function '__dma_async_device_channel_register':
drivers/dma/dmaengine.c:1073:17: error: format not a string literal and no format arguments [-Werror=format-security]
 1073 |                 dev_set_name(&chan->dev->device, name);
      |                 ^~~~~~~~~~~~

Change this newly added instance to use "%s" as the format instead to
pass the actual name.

Fixes: 10b8e0fd ("dmaengine: add channel device name to channel registration")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarDave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20240719102319.546622-1-arnd@kernel.org


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 39dc2a49
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment