Merge tag 'net-next-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev...
[platform/kernel/linux-starfive.git] / mm / memory.c
index 1188218..58029fd 100644 (file)
@@ -77,6 +77,7 @@
 #include <linux/ptrace.h>
 #include <linux/vmalloc.h>
 #include <linux/sched/sysctl.h>
+#include <linux/net_mm.h>
 
 #include <trace/events/kmem.h>
 
@@ -5262,12 +5263,12 @@ retry:
        if (!vma)
                goto inval;
 
-       /* Only anonymous vmas are supported for now */
-       if (!vma_is_anonymous(vma))
+       /* Only anonymous and tcp vmas are supported for now */
+       if (!vma_is_anonymous(vma) && !vma_is_tcp(vma))
                goto inval;
 
        /* find_mergeable_anon_vma uses adjacent vmas which are not locked */
-       if (!vma->anon_vma)
+       if (!vma->anon_vma && !vma_is_tcp(vma))
                goto inval;
 
        if (!vma_start_read(vma))