Commit 5d09c63
committed
cxl/hdm: Remove broken error path
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@linaro.org>
Closes: http://lore.kernel.org/r/63295673-5d63-4919-b851-3b06d48734c0@moroto.mountain
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Fixes: 176baef ("cxl/hdm: Commit decoder state to hardware")
Signed-off-by: Dan Williams <dan.j.williams@intel.com>1 parent 69d56b1 commit 5d09c63
2 files changed
Lines changed: 10 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
568 | | - | |
| 568 | + | |
569 | 569 | | |
570 | 570 | | |
571 | 571 | | |
572 | 572 | | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | 573 | | |
580 | 574 | | |
581 | 575 | | |
| |||
591 | 585 | | |
592 | 586 | | |
593 | 587 | | |
594 | | - | |
595 | | - | |
596 | 588 | | |
597 | 589 | | |
598 | 590 | | |
| |||
680 | 672 | | |
681 | 673 | | |
682 | 674 | | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
| 675 | + | |
690 | 676 | | |
691 | 677 | | |
692 | 678 | | |
| |||
704 | 690 | | |
705 | 691 | | |
706 | 692 | | |
707 | | - | |
708 | 693 | | |
709 | 694 | | |
710 | 695 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1196 | 1196 | | |
1197 | 1197 | | |
1198 | 1198 | | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
1199 | 1207 | | |
1200 | 1208 | | |
1201 | 1209 | | |
| |||
0 commit comments