Commit 3e4f99e
committed
drivers: media: pisp_be: Fix use after free in job queue logic
pispbe_schedule() currently takes a node group as a parameter, which is
left over from before the job prepare/scheduling refactoring. This is
now invalid, as jobs are executed in the order which they were queued.
As part of this old code, there was a check if the current node group
mached the node group of the job, and if unmathched, use a "continue"
statement. This is invalid as there is no loop to iterate over any more.
The reason this was not a compile bug is because of the for loop used
as part of the scoped_guard macro.
A consequence of breaking out of the scoped_guard loop early is that
the job structure gets freed, but not actually removed from the queue
and may be accessed after freeing.
Fix this by removing the node group test in pispbe_schedule() as it is
no longer valid to use.
Signed-off-by: Naushir Patuck <[email protected]>1 parent 1506a5e commit 3e4f99e
1 file changed
+4
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
597 | | - | |
598 | | - | |
599 | | - | |
| 597 | + | |
600 | 598 | | |
601 | 599 | | |
602 | 600 | | |
| |||
613 | 611 | | |
614 | 612 | | |
615 | 613 | | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | 614 | | |
620 | 615 | | |
621 | 616 | | |
| |||
703 | 698 | | |
704 | 699 | | |
705 | 700 | | |
706 | | - | |
| 701 | + | |
707 | 702 | | |
708 | 703 | | |
709 | 704 | | |
| |||
894 | 889 | | |
895 | 890 | | |
896 | 891 | | |
897 | | - | |
| 892 | + | |
898 | 893 | | |
899 | 894 | | |
900 | 895 | | |
| |||
921 | 916 | | |
922 | 917 | | |
923 | 918 | | |
924 | | - | |
| 919 | + | |
925 | 920 | | |
926 | 921 | | |
927 | 922 | | |
| |||
0 commit comments