]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: idxd: wq size configuration needs to check global max size
authorDave Jiang <dave.jiang@intel.com>
Wed, 19 Feb 2020 17:24:56 +0000 (10:24 -0700)
committerVinod Koul <vkoul@kernel.org>
Mon, 24 Feb 2020 16:32:34 +0000 (22:02 +0530)
commit73a39e9dd634ba453e78492e58a26276be22acb7
treed2ec9b5ab05ab731010bea4aa9151c1df1afc1b5
parentf00c4b54880199213ca7fcc29ca540e4934a8a30
dmaengine: idxd: wq size configuration needs to check global max size

The current size_store() function for idxd sysfs does not check the total
wq size. This allows configuration of all wqs with total wq size. Add check
to make sure the wq sysfs attribute rejects storing of size over the total
wq size.

Fixes: 5c1d9d10ca7d ("dmaengine: idxd: add configuration component of driver")
Reported-by: Jerry Chen <jerry.t.chen@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/158213309629.2509.3583411832507185041.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/idxd/sysfs.c