lkml.org 
[lkml]   [2024]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] random: Fix the issue of '_might_sleep' function running in an atomic contex
Date
On Mon, 18 Mar 2024 21:00:42 +0100, Jason A. Donenfeld wrote:
> I'm wondering, though, rather than introducing a second function, maybe
> execute_in_process_context() should just gain a `&& !in_atomic()`.
> That'd make things a bit simpler.

> However, I'm pretty sure in_atomic() isn't actually a reliable way of
> determining that, depending on config. So maybe this should just call
> the worker always (if system_wq isn't null).

> Alternatively, any chance the call to add_input_randomness() could be
> moved outside the spinlock, or does this not look possible?

Hi Jason,

Thanks for your suggestions.

I am inclined to accept your second suggestion. My reluctance to accept
the first is due to the concern that "&& !in_atomic()" could potentially
alter the original meaning of the 'execute_in_process_context' interface.
Regarding the third suggestion, modifying the logic associated with 'input'
is not recommended.

\
 
 \ /
  Last update: 2024-05-27 15:54    [W:0.046 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site