From patchwork Mon Apr 2 01:54:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 10319397 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A5FB060388 for ; Mon, 2 Apr 2018 01:54:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 957B428C8A for ; Mon, 2 Apr 2018 01:54:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A2EF28C92; Mon, 2 Apr 2018 01:54:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4180328C8A for ; Mon, 2 Apr 2018 01:54:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754087AbeDBBy3 (ORCPT ); Sun, 1 Apr 2018 21:54:29 -0400 Received: from mail-pf0-f178.google.com ([209.85.192.178]:46074 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754046AbeDBBy1 (ORCPT ); Sun, 1 Apr 2018 21:54:27 -0400 Received: by mail-pf0-f178.google.com with SMTP id l27so8511009pfk.12; Sun, 01 Apr 2018 18:54:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=eP8G6Zsvf+yUy+SZvKJUtpWtruUQSkgha/h6l3myqcw=; b=FWUedsteRdfAla48HfuCcf5p6Xx5LlS7hIwfUR+UOCj0fp1TDGSxnOY3u1rR55JMaP aowY3FK7k39XsTT0WmlVKSpUjGn2uGxox/tZYQFOqwPKguJtD0h4ismL74dYS5JuSRXf UleNYj+395VtisMpRQF8LNOs2ArSwvvFGUfZvQFjYh5/QsfFCJQcsl8feVTkqpQ09LwC DsLc8ygx08podmnXF6PG0Zy3Mu9I0nd5uR7LZfG6z7kfHqF3etzYtHFToRJsnpdZPsUK VHxh1qPs/bSjmRLlGJsFB1DyzaUvb8phFjvQrYTUIZjJB1qctQ4Oy/721o60NO1YMJY/ KYyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=eP8G6Zsvf+yUy+SZvKJUtpWtruUQSkgha/h6l3myqcw=; b=PIQV7ebUyl2KyAMTfubpzFZGmOxl9PtA3ZOYMeo73jM85dLcaKSaaRDoF6XvMGF5vn I6V4y2L4XbMmwcdIZy1SeTLZr5tfFZqp7mOduh9n0Dbb/ciovXgKsOxJP7+eswTey1p0 XynJ0LVVZro8DHguYIeiYeDAdfqnS8g/DFqLK6/5XBCKnBaq/2TI1tw3F1z/UomTkFpJ q/5Y2/dC7cf1DKekdNDJ6lF7yh0jDUXidEfs7EOeXakMmwHOXP2ypKWRmQnxXY8KE2YP VblTLDrj7RtbnFW7FpWQJDLBNq/M8CgxzzTFnMv1dil5QcfksBfIn4sSUKtW5ZvfhQZA wW8w== X-Gm-Message-State: AElRT7GTFz4EDUub0Bxbc3J1oswBJ/KkXiMsiHf+lPM33RFp5VmLW1DS PHoneFb2Y2ckq/BiwHXwJW8= X-Google-Smtp-Source: AIpwx4/ZxRs5OegSdxAHSQgpETnFPDPPHw/t/mCR8dWH1Ty8XzksAqx860c+oETVKjyaguEAhWreHg== X-Received: by 10.99.49.74 with SMTP id x71mr5036028pgx.160.1522634066742; Sun, 01 Apr 2018 18:54:26 -0700 (PDT) Received: from localhost ([175.223.19.139]) by smtp.gmail.com with ESMTPSA id 81sm28094188pfl.92.2018.04.01.18.54.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 01 Apr 2018 18:54:25 -0700 (PDT) Date: Mon, 2 Apr 2018 10:54:22 +0900 From: Sergey Senozhatsky To: Dmitry Vyukov Cc: syzbot , LKML , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , syzkaller-bugs@googlegroups.com, Samuel Ortiz , David Miller , linux-wireless@vger.kernel.org, netdev Subject: Re: INFO: rcu detected stall in vprintk_func Message-ID: <20180402015422.GA3795@jagdpanzerIV> References: <001a113fe6c0a6ec650568c7384f@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On (04/01/18 12:51), Dmitry Vyukov wrote: [..] > > IMPORTANT: if you fix the bug, please add the following tag to the commit: > > Reported-by: syzbot+3f28bd18291266ec826b@syzkaller.appspotmail.com > > It will help syzbot understand when the bug is fixed. See footer for > > details. > > If you forward the report, please keep this part and the footer. > > > > llcp: nfc_llcp_send_ui_frame: Could not allocate PDU > > llcp: nfc_llcp_send_ui_frame: Could not allocate PDU > > llcp: nfc_llcp_send_ui_frame: Could not allocate PDU > > llcp: nfc_llcp_send_ui_frame: Could not allocate PDU Yes, this thing do { remote_miu = sock->remote_miu > LLCP_MAX_MIU ? local->remote_miu : sock->remote_miu; frag_len = min_t(size_t, remote_miu, remaining_len); pr_debug("Fragment %zd bytes remaining %zd", frag_len, remaining_len); pdu = nfc_alloc_send_skb(sock->dev, &sock->sk, MSG_DONTWAIT, frag_len + LLCP_HEADER_SIZE, &err); if (pdu == NULL) { pr_err("Could not allocate PDU\n"); continue; ^^^^^^^^ } is basically do { pr_err("Could not allocate PDU\n"); } while (1) Can cause problems sometimes. But this loop is a bit worrisome even without the printk() call. From printk() side, we only can do rate limiting here. Would be great if nfc maintainers could take a look and tweak the loop maybe. diff --git a/net/nfc/llcp_core.c b/net/nfc/llcp_core.c index ef4026a23e80..a309a27581da 100644 --- a/net/nfc/llcp_core.c +++ b/net/nfc/llcp_core.c @@ -1386,7 +1386,7 @@ static void nfc_llcp_recv_agf(struct nfc_llcp_local *local, struct sk_buff *skb) new_skb = nfc_alloc_recv_skb(pdu_len, GFP_KERNEL); if (new_skb == NULL) { - pr_err("Could not allocate PDU\n"); + pr_err_ratelimited("Could not allocate PDU\n"); return; }