Merge tag 'net-next-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev...
[linux-2.6-microblaze.git] / kernel / trace / bpf_trace.c
index 172ef54..7fa2ebc 100644 (file)
@@ -337,8 +337,6 @@ BPF_CALL_3(bpf_probe_write_user, void __user *, unsafe_ptr, const void *, src,
        if (unlikely(in_interrupt() ||
                     current->flags & (PF_KTHREAD | PF_EXITING)))
                return -EPERM;
-       if (unlikely(uaccess_kernel()))
-               return -EPERM;
        if (unlikely(!nmi_uaccess_okay()))
                return -EPERM;
 
@@ -840,8 +838,6 @@ static int bpf_send_signal_common(u32 sig, enum pid_type type)
         */
        if (unlikely(current->flags & (PF_KTHREAD | PF_EXITING)))
                return -EPERM;
-       if (unlikely(uaccess_kernel()))
-               return -EPERM;
        if (unlikely(!nmi_uaccess_okay()))
                return -EPERM;