# Re: \[PATCH\] kprobes: Reduce preempt disable scope in check\_kprobe\_access\_safe()

- From: Sebastian Andrzej Siewior \<bigeasy@linutronix.de\>
- Date: 2024-11-21 08:04:35 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2024/11/2832384
- Thread: https://ratatoskr.run/linux-trace-kernel/2024/11/2832368/t.md

```text
On 2024-11-21 08:38:08 [+0100], Thomas Weißschuh wrote:
…
> Signed-off-by: Thomas Weißschuh <redacted>

Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

> diff --git a/kernel/kprobes.c b/kernel/kprobes.c
> index da59c68df8412c4662d39d3e286d516e8cee9a69..369020170e832a34ea9c05eda6693bded02ec505 100644
> --- a/kernel/kprobes.c
> +++ b/kernel/kprobes.c
> @@ -39,6 +39,7 @@
>  #include <linux/static_call.h>
>  #include <linux/perf_event.h>
>  #include <linux/execmem.h>
> +#include <linux/cleanup.h>

This hunk can be dropped. The definition for guard(preempt)() comes from
preempt.h.

>  #include <asm/sections.h>
>  #include <asm/cacheflush.h>

Sebastian
```
