Commit a5a9230
fbdev: fbcon: Properly revert changes when vc_resize() failed
fbcon_do_set_font() calls vc_resize() when font size is changed.
However, if if vc_resize() failed, current implementation doesn't
revert changes for font size, and this causes inconsistent state.
syzbot reported unable to handle page fault due to this issue [1].
syzbot's repro uses fault injection which cause failure for memory
allocation, so vc_resize() failed.
This patch fixes this issue by properly revert changes for font
related date when vc_resize() failed.
Link: https://syzkaller.appspot.com/bug?id=3443d3a1fa6d964dd7310a0cb1696d165a3e07c4 [1]
Reported-by: [email protected]
Signed-off-by: Shigeru Yoshida <[email protected]>
Signed-off-by: Helge Deller <[email protected]>
CC: [email protected] # 5.15+1 parent 8d02685 commit a5a9230
1 file changed
+25
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2401 | 2401 | | |
2402 | 2402 | | |
2403 | 2403 | | |
2404 | | - | |
| 2404 | + | |
2405 | 2405 | | |
2406 | 2406 | | |
2407 | 2407 | | |
2408 | 2408 | | |
2409 | 2409 | | |
2410 | 2410 | | |
| 2411 | + | |
2411 | 2412 | | |
2412 | 2413 | | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
2413 | 2419 | | |
2414 | 2420 | | |
2415 | 2421 | | |
| |||
2425 | 2431 | | |
2426 | 2432 | | |
2427 | 2433 | | |
2428 | | - | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
2429 | 2437 | | |
2430 | 2438 | | |
2431 | 2439 | | |
| |||
2435 | 2443 | | |
2436 | 2444 | | |
2437 | 2445 | | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
| 2450 | + | |
| 2451 | + | |
| 2452 | + | |
| 2453 | + | |
| 2454 | + | |
| 2455 | + | |
| 2456 | + | |
| 2457 | + | |
| 2458 | + | |
| 2459 | + | |
| 2460 | + | |
2438 | 2461 | | |
2439 | 2462 | | |
2440 | 2463 | | |
| |||
0 commit comments