[PATCH v2] random: Fix the issue of '_might_sleep' function running in an atomic contex

Jason A. Donenfeld Jason at zx2c4.com
Fri Apr 19 05:05:28 PDT 2024


On Fri, Apr 19, 2024 at 06:54:53PM +0800, Guoyong Wang wrote:
> In the case that a delay is acceptable for 'crng_set_ready', it can be
> deferred to a workqueue in order to accommodate different contexts.
> 
> Signed-off-by: Guoyong Wang <guoyong.wang at mediatek.com>
> ---
> v2: Compared to version 1, version 2 has removed the definition of
> 'execute_in_non_atomic_context' and always uses a workqueue to execute 
> 'crng_set_ready'.
> 
>   Send out the patch again for further discussion.
> 
> [1]: https://patchwork.kernel.org/patch/13595066

Sorry, but this doesn't make sense in terms of how kernel development is
typically done:

1) Before you sent this, I told you there was no need for a v2.
2) The removal snippet at the bottom applies to your previous v1, not to
   upstream code.
3) The other snippet is taken verbatim from a patch that I posted.
4) That snippet is already upstream:
   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e871abcda3b67d0820b4182ebe93435624e9c6a4

There is no further work to do on this. Thank you for reporting the bug
- very appreciated - and for discussing the fix. But now we have a fix.
So everything is all set and there's nothing else to do and everyone can
be happy.

Jason



More information about the linux-arm-kernel mailing list