We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a86ac3 commit 700b2b4Copy full SHA for 700b2b4
kernel/trace/fprobe.c
@@ -189,7 +189,7 @@ static int fprobe_init_rethook(struct fprobe *fp, int num)
189
{
190
int i, size;
191
192
- if (num < 0)
+ if (num <= 0)
193
return -EINVAL;
194
195
if (!fp->exit_handler) {
@@ -202,8 +202,8 @@ static int fprobe_init_rethook(struct fprobe *fp, int num)
202
size = fp->nr_maxactive;
203
else
204
size = num * num_possible_cpus() * 2;
205
- if (size < 0)
206
- return -E2BIG;
+ if (size <= 0)
+ return -EINVAL;
207
208
fp->rethook = rethook_alloc((void *)fp, fprobe_exit_handler);
209
if (!fp->rethook)
0 commit comments