diff options
| author | 2019-01-14 15:33:23 -0800 | |
|---|---|---|
| committer | 2019-01-14 15:33:23 -0800 | |
| commit | 3eb66e91a25497065c5322b1268cbc3953642227 (patch) | |
| tree | 69f8e1312323ceeafc1a0fdc24d168e1617ffed4 /kernel/fail_function.c | |
| parent | Input: raspberrypi-ts - fix link error (diff) | |
| parent | Linux 4.20 (diff) | |
Merge tag 'v4.20' into for-linus
Sync with mainline to get linux/overflow.h among other things.
Diffstat (limited to 'kernel/fail_function.c')
| -rw-r--r-- | kernel/fail_function.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/fail_function.c b/kernel/fail_function.c index 1d5632d8bbcc..17f75b545f66 100644 --- a/kernel/fail_function.c +++ b/kernel/fail_function.c @@ -173,8 +173,7 @@ static void fei_debugfs_remove_attr(struct fei_attr *attr) struct dentry *dir; dir = debugfs_lookup(attr->kp.symbol_name, fei_debugfs_dir); - if (dir) - debugfs_remove_recursive(dir); + debugfs_remove_recursive(dir); } static int fei_kprobe_handler(struct kprobe *kp, struct pt_regs *regs) @@ -184,9 +183,6 @@ static int fei_kprobe_handler(struct kprobe *kp, struct pt_regs *regs) if (should_fail(&fei_fault_attr, 1)) { regs_set_return_value(regs, attr->retval); override_function_with_return(regs); - /* Kprobe specific fixup */ - reset_current_kprobe(); - preempt_enable_no_resched(); return 1; } @@ -258,7 +254,7 @@ static ssize_t fei_write(struct file *file, const char __user *buffer, /* cut off if it is too long */ if (count > KSYM_NAME_LEN) count = KSYM_NAME_LEN; - buf = kmalloc(sizeof(char) * (count + 1), GFP_KERNEL); + buf = kmalloc(count + 1, GFP_KERNEL); if (!buf) return -ENOMEM; |
