diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 18:43:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 18:43:27 +0000 |
commit | 2923512cee3cfb8eaf935324ddc8f6edd8263e93 (patch) | |
tree | 2cfe4d9883ebfd5ecede5f13892ee2d6e14c486e /kernel | |
parent | Adding upstream version 6.7.7. (diff) | |
download | linux-2923512cee3cfb8eaf935324ddc8f6edd8263e93.tar.xz linux-2923512cee3cfb8eaf935324ddc8f6edd8263e93.zip |
Adding upstream version 6.7.9.upstream/6.7.9
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/fprobe.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/kernel/trace/fprobe.c b/kernel/trace/fprobe.c index 6cd2a4e3af..9ff0182458 100644 --- a/kernel/trace/fprobe.c +++ b/kernel/trace/fprobe.c @@ -189,9 +189,6 @@ static int fprobe_init_rethook(struct fprobe *fp, int num) { int size; - if (num <= 0) - return -EINVAL; - if (!fp->exit_handler) { fp->rethook = NULL; return 0; @@ -199,15 +196,16 @@ static int fprobe_init_rethook(struct fprobe *fp, int num) /* Initialize rethook if needed */ if (fp->nr_maxactive) - size = fp->nr_maxactive; + num = fp->nr_maxactive; else - size = num * num_possible_cpus() * 2; - if (size <= 0) + num *= num_possible_cpus() * 2; + if (num <= 0) return -EINVAL; + size = sizeof(struct fprobe_rethook_node) + fp->entry_data_size; + /* Initialize rethook */ - fp->rethook = rethook_alloc((void *)fp, fprobe_exit_handler, - sizeof(struct fprobe_rethook_node), size); + fp->rethook = rethook_alloc((void *)fp, fprobe_exit_handler, size, num); if (IS_ERR(fp->rethook)) return PTR_ERR(fp->rethook); |