trigger: always use GFP_ATOMIC on allocation
in_atomic() function should not be used inside a driver, and it does not
guarantee atomic context detection. Following the comment from the
kernel source
/*
* Are we running in atomic context? WARNING: this macro cannot
* always detect atomic context; in particular, it cannot know about
* held spinlocks in non-preemptible kernels. Thus it should not be
* used in the general case to determine whether sleeping is possible.
* Do not use in_atomic() in driver code.
*/
Signed-off-by: Federico Vaga <federico.vaga@cern.ch>
Showing
Please
register
or
sign in
to comment