dmaengine: idxd: add RO check for wq max_batch_size write
authorDave Jiang <dave.jiang@intel.com>
Mon, 11 Apr 2022 22:08:55 +0000 (15:08 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Apr 2022 12:41:04 +0000 (14:41 +0200)
commit2dab40fbb9a73450b01b6e01c1e7e2649fee454d
treec552ed7f236984e58b072f18fb75a511b2f24908
parent18dd60b7a45da4c6e0d40d084a154fb0f1aedf2e
dmaengine: idxd: add RO check for wq max_batch_size write

[ Upstream commit 66903461ffed0b66fc3e0200082d4e09365aacdc ]

Block wq_max_batch_size_store() when the device is configured as read-only
and not configurable.

Fixes: e7184b159dd3 ("dmaengine: idxd: add support for configurable max wq batch size")
Reported-by: Bernice Zhang <bernice.zhang@intel.com>
Tested-by: Bernice Zhang <bernice.zhang@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/164971493551.2201159.1942042593642155209.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/idxd/sysfs.c