Skip to content

Conversation

const-t
Copy link
Contributor

@const-t const-t commented Jul 10, 2025

Store fpu context only when BH has been disabled and restore before enabling BH. Otherwise we may have
dobule call of kernel_fpu_begin(), it may happens in following case:

1) kernel_fpu_begin();
2) local_bh_disable();
3) do_something();
4) local_bh_enable();
5) kernel_fpu_end();

In line (4) local_bh_enable() may call softIRQ
handler that will call kernel_fpu_begin() before calling paired kernel_fpu_end() in line (5).

@const-t const-t requested a review from krizhanovsky July 10, 2025 14:00
@krizhanovsky krizhanovsky requested review from EvgeniiMekhanik and removed request for krizhanovsky July 10, 2025 14:43
Store fpu context only when BH has been disabled and
restore before enabling BH. Otherwise we may have
dobule call of `kernel_fpu_begin()`, it may happens
in following case:
```
1) kernel_fpu_begin();
2) local_bh_disable();
3) do_something();
4) local_bh_enable();
5) kernel_fpu_end();
```
In line (4) `local_bh_enable()` may call softIRQ
handler that will call `kernel_fpu_begin()` before
calling paired `kernel_fpu_end()` in line (5).
@const-t const-t force-pushed the kt-fpu-fix-port-0.8 branch from 37ab287 to 7318cfe Compare August 8, 2025 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants