From patchwork Thu Apr 7 02:22:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Willem de Bruijn X-Patchwork-Id: 8768091 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EB2349F372 for ; Thu, 7 Apr 2016 02:24:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 024D9201D3 for ; Thu, 7 Apr 2016 02:24:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DE391201BC for ; Thu, 7 Apr 2016 02:24:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751559AbcDGCXm (ORCPT ); Wed, 6 Apr 2016 22:23:42 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:34739 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750923AbcDGCXk (ORCPT ); Wed, 6 Apr 2016 22:23:40 -0400 Received: by mail-lf0-f65.google.com with SMTP id e190so6163920lfe.1; Wed, 06 Apr 2016 19:23:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=b8KdJ5ysISw1YAr5wJh/AUJevpvvfXe9IOGbTQwLxAk=; b=kFqPE+P9SM+PPtQMifQeTy2Lg7rh1gtO9cTU0pOJ3+a/ubqcEBkqlT5Us7y/nRv8FA osrWMkS5SmqRxZ4/4VcVbRpWVI2II/84U4SsvJhjCdTNGOmg2N9s2iPbVg6w7xlGt9d3 V3mvPbEIjbgX62Yxi26eXpJgQu5+81knJwzAEfpZzLyZo/YZpi91vAduPzx4e2rFZiEF FtchEIpE0HCPY2eZ1mXWmkPHFcjNHtgFYuolxV3e6VlIq4uAUI7Sb/+TvX81dw8kTKlL eHZNrWVHFiZn8GhIEreGMkgQ1O62nPOUy7eZfWOe+4GtgSrcZY7WPCwXmXpxlLyaYBT0 Jnfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=b8KdJ5ysISw1YAr5wJh/AUJevpvvfXe9IOGbTQwLxAk=; b=dIu7vFbHArRGMMjnVVcRw8InwbGPMCv1B5F3Pu5wJEIILWr2vuRg27i6Eq7o8MfWCs UNyyQG6nv6Cj8HHoS93OKGU/zgDLzvvVfgJzZbfBDsrG3U5WCRJ416krseEyJJcd68Mj fFqbHVObQRs/UVMdgFfC4Fxu07PfBY5QLwwnXkayZMH8V7Ivc++F5btNtI2J1pMYgcRv gGGILqeYvm6Jilwc2VyQc2xjvIAGQBzy0LpWW4VX0VzD+dvvJou4+urCW3RmWyWros1B o+2m3g/MvNKDjHHuq7uUT2S2QP1YjJ2SeNopMxYt66b32wbXXf0spg7MFlSJZ+ut3L9m /G8g== X-Gm-Message-State: AD7BkJLcEgzvKu7gV30Lb2Pbq/uC+y/n2gu3zGSX4gl51jQotOXVBuSdnK3H41R0QJz0wHN08gu8mzj9Ya0w8w== X-Received: by 10.25.210.75 with SMTP id j72mr252955lfg.75.1459995818241; Wed, 06 Apr 2016 19:23:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.18.225 with HTTP; Wed, 6 Apr 2016 19:22:58 -0700 (PDT) In-Reply-To: <570597EA.3040902@ti.com> References: <570597EA.3040902@ti.com> From: Willem de Bruijn Date: Wed, 6 Apr 2016 22:22:58 -0400 Message-ID: Subject: Re: Boot failure when using NFS on OMAP based evms To: "Franklin S Cooper Jr." Cc: Sam Kumar , Willem de Bruijn , Eric Dumazet , tony@atomide.com, mugunthanvnm@ti.com, Network Development , LKML , David Miller , kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org, kaber@trash.net, nsekhar@ti.com, linux-omap@vger.kernel.org Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, Apr 6, 2016 at 7:12 PM, Franklin S Cooper Jr. wrote: > Hi All, > > Currently linux-next is failing to boot via NFS on my AM335x GP evm, > AM437x GP evm and Beagle X15. I bisected the problem down to the commit > "udp: remove headers from UDP packets before queueing". > > I had to revert the following three commits to get things working again: > > e6afc8ace6dd5cef5e812f26c72579da8806f5ac > udp: remove headers from UDP packets before queueing > > 627d2d6b550094d88f9e518e15967e7bf906ebbf > udp: enable MSG_PEEK at non-zero offset > > b9bb53f3836f4eb2bdeb3447be11042bd29c2408 > sock: convert sk_peek_offset functions to WRITE_ONCE > Thanks for the report, and apologies for breaking your configuration. I had missed that sunrpc can dequeue skbs from a udp receive queue and makes assumptions about the layout of those packets. rxrpc does the same. From what I can tell so far, those are the only two protocols that do this. I have verified that the following fixes rxrpc for me return; --- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/net/rxrpc/ar-input.c +++ b/net/rxrpc/ar-input.c @@ -612,9 +612,9 @@ int rxrpc_extract_header(struct rxrpc_skb_priv *sp, struct sk_buff *skb) struct rxrpc_wire_header whdr; /* dig out the RxRPC connection details */ - if (skb_copy_bits(skb, sizeof(struct udphdr), &whdr, sizeof(whdr)) < 0) + if (skb_copy_bits(skb, 0, &whdr, sizeof(whdr)) < 0) return -EBADMSG; - if (!pskb_pull(skb, sizeof(struct udphdr) + sizeof(whdr))) + if (!pskb_pull(skb, sizeof(whdr))) BUG(); I have not yet been able to reproduce the sunrpc/nfs issue, but I suspect that the following might fix it. I will try to create an NFS setup. diff --git a/net/sunrpc/socklib.c b/net/sunrpc/socklib.c index 2df87f7..8ab40ba 100644 --- a/net/sunrpc/socklib.c +++ b/net/sunrpc/socklib.c @@ -155,7 +155,7 @@ int csum_partial_copy_to_xdr(struct xdr_buf *xdr, struct sk_buff *skb) struct xdr_skb_reader desc; desc.skb = skb; - desc.offset = sizeof(struct udphdr); + desc.offset = 0; desc.count = skb->len - desc.offset; if (skb_csum_unnecessary(skb)) diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 1413cdc..71d6072 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c @@ -617,7 +617,7 @@ static int svc_udp_recvfrom(struct svc_rqst *rqstp) svsk->sk_sk->sk_stamp = skb->tstamp; set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags); /* there may be more data... */ - len = skb->len - sizeof(struct udphdr); + len = skb->len; rqstp->rq_arg.len = len; rqstp->rq_prot = IPPROTO_UDP; @@ -641,8 +641,7 @@ static int svc_udp_recvfrom(struct svc_rqst *rqstp) skb_free_datagram_locked(svsk->sk_sk, skb); } else { /* we can use it in-place */ - rqstp->rq_arg.head[0].iov_base = skb->data + - sizeof(struct udphdr); + rqstp->rq_arg.head[0].iov_base = skb->data; rqstp->rq_arg.head[0].iov_len = len; if (skb_checksum_complete(skb)) goto out_free; diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 65e7595..c1fc7b2 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -995,15 +995,14 @@ static void xs_udp_data_read_skb(struct rpc_xprt *xprt, u32 _xid; __be32 *xp; - repsize = skb->len - sizeof(struct udphdr); + repsize = skb->len; if (repsize < 4) { dprintk("RPC: impossible RPC reply size %d!\n", repsize); return; } /* Copy the XID from the skb... */ - xp = skb_header_pointer(skb, sizeof(struct udphdr), - sizeof(_xid), &_xid); + xp = skb_header_pointer(skb, 0, sizeof(_xid), &_xid); if (xp == NULL)