From patchwork Tue Jan 12 02:25:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 8013311 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 2E4759F1CC for ; Tue, 12 Jan 2016 02:25:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 590D62012B for ; Tue, 12 Jan 2016 02:25:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 76A1120145 for ; Tue, 12 Jan 2016 02:25:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762280AbcALCZT (ORCPT ); Mon, 11 Jan 2016 21:25:19 -0500 Received: from mail-pf0-f170.google.com ([209.85.192.170]:36765 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762278AbcALCZR (ORCPT ); Mon, 11 Jan 2016 21:25:17 -0500 Received: by mail-pf0-f170.google.com with SMTP id n128so54287247pfn.3; Mon, 11 Jan 2016 18:25:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version:content-transfer-encoding; bh=iGNzMr+IOmIRDDeD6tZIR7v+TO2G4LbLYbUYg1JNoH8=; b=vkicY7YMo2DI+Soy1WmKQ0WEn8B7zQVsbyNd1Cq2fTO+dbATe9/MBMK8Qs7N6n+pvC Rm0PPq6nbbtg0pcMwa+gpewQQ7aKdls5zhetL76mb95IqqcoRQEJ28QOybsDlNmD587v SEG4/fjuXaaZBKj+vgWTeBDtT/KfumeMw7uwjUmdifRqIcowHk/wkGAqecVo9DIxVmrn OT4YaQmp7OPPGBlN1I4Cs5dWRjrEZPm4yP/WfQwMoNyt2mV5nymjriN2zYh6ZfW3HbZ7 mRuB3eT0S9nWWKQHgNguJSLDDReOuGEwVpiBrpRf5UnZXqQhwEpl0uhH/K909BygwUq8 QsTw== X-Received: by 10.98.68.211 with SMTP id m80mr30980226pfi.117.1452565517102; Mon, 11 Jan 2016 18:25:17 -0800 (PST) Received: from [172.19.255.212] ([172.19.255.212]) by smtp.gmail.com with ESMTPSA id n2sm23780646pfj.16.2016.01.11.18.25.16 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 11 Jan 2016 18:25:16 -0800 (PST) Message-ID: <1452565515.1223.11.camel@edumazet-glaptop2.roam.corp.google.com> Subject: Re: [OOPS] In __netif_receive_skb_core From: Eric Dumazet To: Salam Noureddine Cc: Ivaylo Dimitrov , "David S. Miller" , Pali =?ISO-8859-1?Q?Roh=E1r?= , Network Development , LKML , Sebastian Reichel , "linux-omap@vger.kernel.org" Date: Mon, 11 Jan 2016 18:25:15 -0800 In-Reply-To: <1452565288.1223.10.camel@edumazet-glaptop2.roam.corp.google.com> References: <568EA671.7000502@gmail.com> <56929985.3020502@gmail.com> <1452457610.16445.13.camel@edumazet-glaptop2.roam.corp.google.com> <5694188F.80907@gmail.com> <56944DFA.4050002@gmail.com> <1452560786.1223.6.camel@edumazet-glaptop2.roam.corp.google.com> <1452565288.1223.10.camel@edumazet-glaptop2.roam.corp.google.com> X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.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=ham 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 Mon, 2016-01-11 at 18:21 -0800, Eric Dumazet wrote: > On Mon, 2016-01-11 at 17:19 -0800, Salam Noureddine wrote: > > It must be that skb->dev was changed to NULL inside of > > __netif_receive_skb_core, otherwise we would have crashed much > > earlier. Also, orig_dev is saved at the beginning. Possibly a device > > is layered on top of the original device. > > Please do not top post on netdev / lkml mailing lists. > > My guess is a protocol handler queued the skb without calling > skb_share_check() > OK please try this fix : --- 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 diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c index 10d42f3220ab..f925753668a7 100644 --- a/net/phonet/af_phonet.c +++ b/net/phonet/af_phonet.c @@ -377,6 +377,10 @@ static int phonet_rcv(struct sk_buff *skb, struct net_device *dev, struct sockaddr_pn sa; u16 len; + skb = skb_share_check(skb, GFP_ATOMIC); + if (!skb) + return NET_RX_DROP; + /* check we have at least a full Phonet header */ if (!pskb_pull(skb, sizeof(struct phonethdr))) goto out;