Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6694627yba; Tue, 14 May 2019 11:55:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqxSqn4a+oWYfjXNJAcDDb3VRE71z3mscgU4U+1XvCAmbvD6TMvLxY8hBFYGBTC5WaDNZM7Q X-Received: by 2002:aa7:9afc:: with SMTP id y28mr42747609pfp.101.1557860124812; Tue, 14 May 2019 11:55:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557860124; cv=none; d=google.com; s=arc-20160816; b=l4Mi3ro1Qkp7HgNgDyTXq3OdbK4KOkRS6oDL2X5sHG6CLz3N/xByxl26CSgk6JLl+m QYblefNK6CEHrHRmdfbUZnrv8kUi+K/KApFmYzNfdMt5XSmk5SxyoQRagXnvn5alck+Y ks78ZbLFF9YUmNPC3RsQTdr0GK/77UCdQzxO/XoT+YNaNdotYCWxR2a0nyHJ7A2rUwKk ueUK/3WQFu0P/jaM/CFrL0UXSPuM5FaYzZHU29nvYOvmz4bEumqoAVj002or/CpnLLRf ch51PvKDUBpYKKZG2PKndNdbGlY3jVmdD3qb18DdQHF4yOZunn/oAm6rWrVoYmKt/Y2Y 9AIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :dkim-signature:dkim-filter; bh=2W00pXe52sSjwt27aWC+uAS19Y6Pj//0EcdJFUMrJPc=; b=SMJL4nYcKQ1la11ZhFZ/7+7oZaXwP7bd7v/AXc2kfUWZDsQQo609zU8lzDapt51Y2G oCwYmH5o2K10rcPr6EwGBQgB5wU8giDi9J+nmN8VyJkylu8whIghltvfAnC3mO3DY8aj R1TwaZph19EQAWupzVTrMoHJh1K0k3iO2iO43WTglQGQBz8wGocaM98UVn5+I0gOBIls bjjSm7WYQ0fnQmPrbkHySeipNpTBc58d4cqBM/40Lvk+LR5gabOCZaPX4vxB6whrgv/I tCL12WZZFoQb8GmG6bJERCkiKorDlECrRM98yLfK9riNB58gRTQG7wXW3T4yNGyJZqIs +hcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=I98xYCbX; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=candelatech.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b188si7713461pga.223.2019.05.14.11.55.01; Tue, 14 May 2019 11:55:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=I98xYCbX; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=candelatech.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727685AbfENSym (ORCPT + 99 others); Tue, 14 May 2019 14:54:42 -0400 Received: from [208.74.158.174] ([208.74.158.174]:56862 "EHLO mail3.candelatech.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1727262AbfENSym (ORCPT ); Tue, 14 May 2019 14:54:42 -0400 Received: from [192.168.100.195] (50-251-239-81-static.hfc.comcastbusiness.net [50.251.239.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail3.candelatech.com (Postfix) with ESMTPSA id 69A4313755C; Tue, 14 May 2019 11:54:40 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 mail3.candelatech.com 69A4313755C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=candelatech.com; s=default; t=1557860080; bh=0RtU1LDJJk+MluKQvsl0drdP4LbJYsD3Uupu6kZCoC4=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=I98xYCbXtBQwXvs3EWFnGuo0HvTDBmZ3WbZQRCOkZd/31rmv/4/SrZrHl/1U8G3Hr 6WQYcdlIoHPRYFPEivJtOycJYD78ML9h0xO0IHtrUeUC/yGRNdGJAh9VpBWSEtdDC4 ze8KZQ1hEKL0cKLBkyO969HZaZq1JBl9/uvFi/go= Subject: Re: [PATCH v2] mac80211: remove warning message To: Johannes Berg , Yibo Zhao Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org, Zhi Chen References: <1557824507-17668-1-git-send-email-yiboz@codeaurora.org> <7c92f5cf51eaec1d5449698d90f5b6c5ca6c2bea.camel@sipsolutions.net> <34f72d5db336b9898618bf1c5c15ec41094d7d06.camel@perches.com> <4d013893-3302-14f0-c957-b3771f4b6b82@candelatech.com> <8eacb8e107c854b64a0c6116fca9731ddd99dcac.camel@sipsolutions.net> From: Ben Greear Organization: Candela Technologies Message-ID: <730d3664-488d-7d57-04d5-1a57e91fa070@candelatech.com> Date: Tue, 14 May 2019 11:54:40 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <8eacb8e107c854b64a0c6116fca9731ddd99dcac.camel@sipsolutions.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 5/14/19 11:40 AM, Johannes Berg wrote: > >> We know the WARN hits, we have the backtrace, and it is easy enough (in my setup >> at least) to reproduce this. So, the WARN logic has done its job. >> >> Having more of these spam the kernel doesn't add much benefit I think. > > Well, this doesn't necessarily just catch a *single* issue, so it should > remain for the future, I'd think. > >> Anyone have any suggestions on how to fix the underlying issue? > > I don't even have the backtrace and scenario that causes it. > > johannes > Here is the info I have in my commit that changed this to WARN_ON_ONCE. I never posted it because I had to hack ath10k to get to this state, so maybe this is not a valid case to debug. Maybe Yibo Zhao has a better example. mac80211: don't spam kernel logs when chantx is null. I set up ath10k to be chandef based again in order to test WDS. My WDS stations are not very functional yet, and when ethtool stats are queried, there is a WARN_ON splat generated. Change this to WARN_ON_ONCE so that there is less kernel spam. [ 2401.445631] WARNING: CPU: 1 PID: 14070 at /home/greearb/git/linux-4.13.dev.y/net/mac80211/ieee80211_i.h:1452 sta_set_rate_info_tx+0x18c/0x1a0 [mac80211] [ 2401.445727] Modules linked in: nf_conntrack_netlink nf_conntrack nfnetlink wanlink(O) ath10k_pci ath10k_core mac80211_hwsim ath5k ath9k ath9k_common ath9k_hw ath mac80211 cfg80211 nf_defrag_ipv4 libcrc32c 8021q garp mrp stp llc fuse macvlan pktgen nfsv3 nfs fscache amd64_edac_mod edac_mce_amd kvm_amd kvm irqbypass sp5100_tco fam15h_power k10temp i2c_piix4 ccp shpchp acpi_cpufreq nfsd auth_rpcgss nfs_acl lockd grace sch_fq_codel sunrpc sdhci_pci sdhci mmc_core igb hwmon ptp pps_core i2c_algo_bit i2c_core dca ipv6 crc_ccitt [last unloaded: nfnetlink] [ 2401.445911] CPU: 1 PID: 14070 Comm: btserver Tainted: G W O 4.13.11+ #18 [ 2401.445914] Hardware name: PC Engines apu2/apu2, BIOS 88a4f96 03/07/2016 [ 2401.445918] task: ffff880118c73b80 task.stack: ffffc90001400000 [ 2401.445973] RIP: 0010:sta_set_rate_info_tx+0x18c/0x1a0 [mac80211] [ 2401.446003] RSP: 0018:ffffc90001403820 EFLAGS: 00010246 [ 2401.446007] RAX: 0000000000000000 RBX: ffff8800ca38e4a0 RCX: 000000000000000c [ 2401.446010] RDX: 0000000000000000 RSI: ffff8800ca38e4a0 RDI: ffff8800ca38e000 [ 2401.446013] RBP: ffffc90001403850 R08: ffffffffa04437a0 R09: 0000000000002000 [ 2401.446016] R10: 000000001183be82 R11: 0000000000000000 R12: ffffc90001403970 [ 2401.446018] R13: 0000000000000000 R14: ffff8800c01d8900 R15: ffff8800ca180780 [ 2401.446023] FS: 00007f8123ed7740(0000) GS:ffff88011ec80000(0000) knlGS:0000000000000000 [ 2401.446026] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2401.446029] CR2: 00000000036e8018 CR3: 00000000c0b29000 CR4: 00000000000406e0 [ 2401.446034] Call Trace: [ 2401.446140] sta_set_sinfo+0x629/0x8b0 [mac80211] [ 2401.446192] ieee80211_get_stats+0x3f2/0x8c0 [mac80211] [ 2401.446207] ? __nla_put+0x20/0x30 [ 2401.446221] ? __kmalloc_reserve.isra.35+0x2c/0x80 [ 2401.446229] ? netlink_deliver_tap+0x2d/0x1e0 [ 2401.446235] ? sock_def_readable+0x6d/0x70 [ 2401.446239] ? __netlink_sendskb+0x36/0x40 [ 2401.446245] ? netlink_unicast+0x1b0/0x1f0 [ 2401.446252] ? rtnl_getlink+0x135/0x1c0 [ 2401.446261] ? get_page_from_freelist+0x913/0xac0 [ 2401.446270] ? vmap_page_range_noflush+0x27d/0x370 [ 2401.446277] ? map_vm_area+0x31/0x40 [ 2401.446284] ? __vmalloc_node_range+0x21f/0x270 [ 2401.446319] dev_ethtool+0x11d1/0x1ce0 [ 2401.446325] ? __rtnl_unlock+0x25/0x50 [ 2401.446330] ? netdev_run_todo+0x4d/0x2e0 [ 2401.446338] ? dev_get_by_name_rcu+0x6f/0xa0 [ 2401.446344] dev_ioctl+0x330/0x550 [ 2401.446349] ? reuse_swap_page+0x30/0x100 [ 2401.446355] sock_do_ioctl+0x3d/0x50 [ 2401.446359] ? sock_do_ioctl+0x3d/0x50 [ 2401.446363] sock_ioctl+0x1e5/0x2a0 [ 2401.446370] do_vfs_ioctl+0x8b/0x5b0 [ 2401.446376] ? getnstimeofday64+0x9/0x20 [ 2401.446383] ? __audit_syscall_entry+0xba/0x110 [ 2401.446391] ? syscall_trace_enter+0x1b0/0x2b0 [ 2401.446395] SyS_ioctl+0x74/0x80 [ 2401.446400] ? __audit_syscall_exit+0x215/0x2b0 [ 2401.446405] do_syscall_64+0x5c/0x190 [ 2401.446412] entry_SYSCALL64_slow_path+0x25/0x25 Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com