summaryrefslogtreecommitdiffstats
path: root/kernel/kcov.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/kcov.c')
-rw-r--r--kernel/kcov.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/kcov.c b/kernel/kcov.c
index 7594c033d98a..2c16f1ab5e10 100644
--- a/kernel/kcov.c
+++ b/kernel/kcov.c
@@ -358,7 +358,8 @@ static int kcov_ioctl_locked(struct kcov *kcov, unsigned int cmd,
358 */ 358 */
359 if (kcov->mode != KCOV_MODE_INIT || !kcov->area) 359 if (kcov->mode != KCOV_MODE_INIT || !kcov->area)
360 return -EINVAL; 360 return -EINVAL;
361 if (kcov->t != NULL) 361 t = current;
362 if (kcov->t != NULL || t->kcov != NULL)
362 return -EBUSY; 363 return -EBUSY;
363 if (arg == KCOV_TRACE_PC) 364 if (arg == KCOV_TRACE_PC)
364 kcov->mode = KCOV_MODE_TRACE_PC; 365 kcov->mode = KCOV_MODE_TRACE_PC;
@@ -370,7 +371,6 @@ static int kcov_ioctl_locked(struct kcov *kcov, unsigned int cmd,
370#endif 371#endif
371 else 372 else
372 return -EINVAL; 373 return -EINVAL;
373 t = current;
374 /* Cache in task struct for performance. */ 374 /* Cache in task struct for performance. */
375 t->kcov_size = kcov->size; 375 t->kcov_size = kcov->size;
376 t->kcov_area = kcov->area; 376 t->kcov_area = kcov->area;