Commit 11ce8fd
drm/i915/uc: Fix two issues with over-size firmware files
In the case where a firmware file is too large (e.g. someone
downloaded a web page ASCII dump from github...), the firmware object
is released but the pointer is not zerod. If no other firmware file
was found then release would be called again leading to a double kfree.
Also, the size check was only being applied to the initial firmware
load not any of the subsequent attempts. So move the check into a
wrapper that is used for all loads.
Fixes: 0162411 ("drm/i915/uc: use different ggtt pin offsets for uc loads")
Signed-off-by: John Harrison <[email protected]>
Reviewed-by: Daniele Ceraolo Spurio <[email protected]>
Cc: Alan Previn <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: Matt Roper <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Matthew Auld <[email protected]>
Cc: "Thomas Hellström" <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 4071d98)
Signed-off-by: Rodrigo Vivi <[email protected]>1 parent 3f882f2 commit 11ce8fd
1 file changed
+28
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
545 | 545 | | |
546 | 546 | | |
547 | 547 | | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
548 | 574 | | |
549 | 575 | | |
550 | 576 | | |
| |||
558 | 584 | | |
559 | 585 | | |
560 | 586 | | |
561 | | - | |
562 | 587 | | |
563 | 588 | | |
564 | 589 | | |
| |||
574 | 599 | | |
575 | 600 | | |
576 | 601 | | |
577 | | - | |
| 602 | + | |
578 | 603 | | |
579 | 604 | | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | 605 | | |
592 | 606 | | |
593 | 607 | | |
| |||
608 | 622 | | |
609 | 623 | | |
610 | 624 | | |
611 | | - | |
| 625 | + | |
612 | 626 | | |
613 | 627 | | |
614 | 628 | | |
| |||
0 commit comments