Commit 32df4ab
drm/v3d: Fix potential memory leak in the performance extension
If fetching of userspace memory fails during the main loop, all drm sync
objs looked up until that point will be leaked because of the missing
drm_syncobj_put.
Fix it by exporting and using a common cleanup helper.
Signed-off-by: Tvrtko Ursulin <[email protected]>
Fixes: bae7cb5 ("drm/v3d: Create a CPU job extension for the reset performance query job")
Cc: Maíra Canal <[email protected]>
Cc: Iago Toral Quiroga <[email protected]>
Cc: [email protected] # v6.8+
Signed-off-by: Maíra Canal <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 484de39)
Signed-off-by: Thomas Zimmermann <[email protected]>1 parent 0e50fcc commit 32df4ab
3 files changed
+50
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
558 | 558 | | |
559 | 559 | | |
560 | 560 | | |
| 561 | + | |
| 562 | + | |
561 | 563 | | |
562 | 564 | | |
563 | 565 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
90 | 104 | | |
91 | 105 | | |
92 | 106 | | |
93 | 107 | | |
94 | | - | |
95 | 108 | | |
96 | 109 | | |
97 | 110 | | |
98 | 111 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| 112 | + | |
| 113 | + | |
104 | 114 | | |
105 | 115 | | |
106 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
640 | 640 | | |
641 | 641 | | |
642 | 642 | | |
| 643 | + | |
| 644 | + | |
643 | 645 | | |
644 | 646 | | |
645 | 647 | | |
| |||
668 | 670 | | |
669 | 671 | | |
670 | 672 | | |
671 | | - | |
| 673 | + | |
672 | 674 | | |
673 | 675 | | |
674 | 676 | | |
675 | 677 | | |
676 | 678 | | |
677 | 679 | | |
678 | | - | |
679 | | - | |
| 680 | + | |
| 681 | + | |
680 | 682 | | |
681 | 683 | | |
682 | | - | |
683 | | - | |
684 | 684 | | |
685 | | - | |
686 | | - | |
| 685 | + | |
| 686 | + | |
687 | 687 | | |
688 | 688 | | |
689 | 689 | | |
690 | 690 | | |
691 | | - | |
| 691 | + | |
692 | 692 | | |
693 | | - | |
694 | | - | |
| 693 | + | |
| 694 | + | |
695 | 695 | | |
696 | 696 | | |
697 | 697 | | |
698 | 698 | | |
| 699 | + | |
| 700 | + | |
699 | 701 | | |
700 | 702 | | |
701 | 703 | | |
702 | 704 | | |
703 | 705 | | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
704 | 710 | | |
705 | 711 | | |
706 | 712 | | |
| |||
711 | 717 | | |
712 | 718 | | |
713 | 719 | | |
| 720 | + | |
| 721 | + | |
714 | 722 | | |
715 | 723 | | |
716 | 724 | | |
| |||
742 | 750 | | |
743 | 751 | | |
744 | 752 | | |
745 | | - | |
| 753 | + | |
746 | 754 | | |
747 | 755 | | |
748 | 756 | | |
749 | 757 | | |
750 | 758 | | |
751 | 759 | | |
752 | | - | |
753 | | - | |
| 760 | + | |
| 761 | + | |
754 | 762 | | |
755 | 763 | | |
756 | | - | |
757 | | - | |
758 | 764 | | |
759 | | - | |
760 | | - | |
| 765 | + | |
| 766 | + | |
761 | 767 | | |
762 | 768 | | |
763 | 769 | | |
764 | 770 | | |
765 | | - | |
| 771 | + | |
766 | 772 | | |
767 | | - | |
768 | | - | |
| 773 | + | |
| 774 | + | |
769 | 775 | | |
770 | 776 | | |
771 | 777 | | |
772 | 778 | | |
| 779 | + | |
| 780 | + | |
773 | 781 | | |
774 | 782 | | |
775 | 783 | | |
| |||
782 | 790 | | |
783 | 791 | | |
784 | 792 | | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
785 | 797 | | |
786 | 798 | | |
787 | 799 | | |
| |||
0 commit comments