]> 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)
commit2dd76d6410eaa7b083b898e1896da9d386850b9c
treed2ec9b5ab05ab731010bea4aa9151c1df1afc1b5
parent4c51d8044e7b056cba4a36ef20d18f7a77b94ab5
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: f38219f6774e ("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