On Tue, Mar 5, 2019 at 7:11 AM Eric Dumazet <eduma...@google.com> wrote:
>

> >
> > My original suggestion was to use VM_WARN_ONCE() so that the debug checks 
> > would
> > be compiled out by the compiler, unless you compile a debug kernel.
> >
> > Something like :
> >
> > diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
> > index 
> > ad07dd71063da09843ccfbd3e00d3f41567e1205..889563a66dde2a41c198d92a80183cf5382f632d
> >  100644
> > --- a/net/ipv4/tcp.c
> > +++ b/net/ipv4/tcp.c
> > @@ -943,6 +943,9 @@ ssize_t do_tcp_sendpages(struct sock *sk, struct page 
> > *page, int offset,
> >         ssize_t copied;
> >         long timeo = sock_sndtimeo(sk, flags & MSG_DONTWAIT);
> >
> > +       if (VM_WARN_ONCE(PageSlab(page)), "page must not be a Slab one")
> > +               return -EINVAL;
> > +

Well, VM_WARN_ONCE() returns 1 if !CONFIG_DEBUG_VM,
so it is not behaving like WARN_ONCE(), which is unfortunate.

But you get the idea ;)


> >         /* Wait for a connection to finish. One exception is TCP Fast Open
> >          * (passive side) where data is allowed to be sent before a 
> > connection
> >          * is fully established.
> >
> >
> > For some reason you added a fallback :/
> >

Reply via email to