This error path needs to call up_read(&cxl_dpa_rwsem). Fixes: 176baefb2eb5 ("cxl/hdm: Commit decoder state to hardware") Cc: stable@xxxxxxxxxxxxxxx Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> --- drivers/cxl/core/hdm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cxl/core/hdm.c b/drivers/cxl/core/hdm.c index af17da8230d5..0eb580245276 100644 --- a/drivers/cxl/core/hdm.c +++ b/drivers/cxl/core/hdm.c @@ -684,6 +684,7 @@ static int cxl_decoder_commit(struct cxl_decoder *cxld) if (rc) { dev_dbg(&port->dev, "%s: target configuration error\n", dev_name(&cxld->dev)); + up_read(&cxl_dpa_rwsem); goto err; } -- 2.42.0