In the Linux kernel, the following vulnerability has been resolved: kprobes: Fix check for probe enabled in killkprobe() In killkprobe(), the check whether disarmkprobeftrace() needs to be called always fails. This is because before that we set the KPROBEFLAGGONE flag for kprobe so that "!kprobedisabled(p)" is always false. The disarmkprobeftrace() call introduced by commit: 0cb2f1372baa ("kprobes: Fix NULL pointer dereference at kprobeftracehandler") to fix the NULL pointer reference problem. When the probe is enabled, if we do not disarm it, this problem still exists. Fix it by putting the probe enabled check before setting the KPROBEFLAG_GONE flag.