ALSA: asihpi: Fix unlocked snd_pcm_stop() call
[deliverable/linux.git] / kernel / kprobes.c
index bddf3b201a480015e2b1b15c217c43ea6796fcd0..6e33498d665c3caa35ac764a46dd27c7cec80685 100644 (file)
@@ -2332,6 +2332,7 @@ static ssize_t write_enabled_file_bool(struct file *file,
        if (copy_from_user(buf, user_buf, buf_size))
                return -EFAULT;
 
+       buf[buf_size] = '\0';
        switch (buf[0]) {
        case 'y':
        case 'Y':
@@ -2343,6 +2344,8 @@ static ssize_t write_enabled_file_bool(struct file *file,
        case '0':
                disarm_all_kprobes();
                break;
+       default:
+               return -EINVAL;
        }
 
        return count;
This page took 0.035044 seconds and 5 git commands to generate.