Dan Williams wrote: > Dan Carpenter wrote: > > This error path needs to call up_read(&cxl_dpa_rwsem). > > This looks correct for what it is, but that error path is a "should > never happen" situation. It would be better to just eliminate that > possibility altogether... > > -- >8 -- > Subject: cxl/hdm: Remove broken error path > > From: Dan Williams <dan.j.williams@xxxxxxxxx> > > Dan reports that cxl_decoder_commit() potentially leaks a hold of > cxl_dpa_rwsem. The potential error case is a "should" not happen > scenario, turn it into a "can not" happen scenario by adding the error > check to cxl_port_setup_targets() where other setting validation occurs. > > Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> > Closes: http://lore.kernel.org/r/63295673-5d63-4919-b851-3b06d48734c0@moroto.mountain > Fixes: 176baefb2eb5 ("cxl/hdm: Commit decoder state to hardware") Reviewed-by: Ira Weiny <ira.weiny@xxxxxxxxx>