Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1204282lqp; Fri, 22 Mar 2024 08:16:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVIMCv7UqZDdhSlMKdUA0WsYDFkuS2DSjQpHea77cfe9cu8KFfxT/BjI/OZEdLK/Ie6KwswKeZ0mlV0mk0Hp0eoasPrbrz+Vq6tuG2Ujg== X-Google-Smtp-Source: AGHT+IG7KBVq1G19XjLJB8B11dDDCIQ5Xc/jgONVpu/RaM8vsZ6v7FmGCiOLTeLryw6flqbplLVd X-Received: by 2002:a17:902:6546:b0:1df:ff90:5d43 with SMTP id d6-20020a170902654600b001dfff905d43mr52287pln.6.1711120587935; Fri, 22 Mar 2024 08:16:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711120587; cv=pass; d=google.com; s=arc-20160816; b=wYIVCXdhezi1azVFXthmAgkvKXAs6HgMmvGqjJqZpes0OpJF61A02HaDG8GteF4DpM vrnXv4ylEagJCc8ZXA3bWbVx2LXzSS/iSJFktkzPt1z2i7UnOWWI4AeG3/Xd3O8tYdVR izzpY7cJiz2Zwemq8Tbxu+AhcTdpht+5GTFk5RPy0qnuvjURYTmyzuTIsQPcp+ljMRdu LQphIbUgfPHQ6COd//6wdqkhFcH9mRalykzP6tYfXNd8v/Szg+TGHmhc+dFAxTVqvABM iclusLnflqnrnDdJ2CELN9muDOyC9qN0jQYi6N5HtEPgVBu1MNnu190vPncr46tnV8ws AHqg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=SMb2IgPKyZnj/ue62em5Q9KAY8/Lp0+DnO65BTLg4OM=; fh=zk96lV6bH/nMkvuAtbLB8zWEkzPHJqzquga4KcvWiNE=; b=TSuCtyB6d1NLfHjWDUDR1cDfrVA/LUvebCnAgjg9QhZbrRYzV8WTEYFwbFKK4ZYZ79 /MrDk4tOvy3XfRxhzTrMyIt7aymWV4k+3b43UQcEwySGIGf/m423yscZZTOnse9ke3Tk lViNDylLGqPLooyokd780vj5cvbAoHcnSsdXEmZtKz1vNE1spaPkwpjdaF3EDBcpefj8 LsS78hPINzdBR1WFBqA9T9kFn2YZvKkeXV9xDhhlTx6RKuZb36lDSTKN4x+Wsuq3fToJ 1A2rrpC3u8NDxh9Yyc1aneDlH2QWYUPXl6lXh3J6wMQOU7bamIyWATUJyH/bKvNjm+Ew GqTQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-wireless+bounces-5153-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5153-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id mc3-20020a1709032b0300b001e09c581148si391767plb.593.2024.03.22.08.16.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 08:16:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-5153-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-wireless+bounces-5153-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5153-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 83834284822 for ; Fri, 22 Mar 2024 15:16:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C40B04CE13; Fri, 22 Mar 2024 15:16:23 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 16FCF3C17; Fri, 22 Mar 2024 15:16:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711120583; cv=none; b=KAKeM2x9LardCsyAQcN07SlQVLRAeXrvM6G0bAZ72vhNzpfBnv9kTWAl4nY7B91abGXCQxDn1LDOmfxnvTyP+yloiJOwcgz0d8HrvqXZU0Grd8nZ0/8ol5SID+bOG5heRpFZ7u6VMnLb/xfIlI6RhHToM8TeqnFI/In6mItoyGg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711120583; c=relaxed/simple; bh=k6ZBqXOSOxwfvSpr3Zn2oOPOvUxMxZJnrUwc4UoCotY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sRl7vAAbB5VGKJmYKF4MFlAs/uvWF1jrovrBA1iBj4D1KD4v9ickIpHuftzp9/SVWQSm2hXKHRj+dPvdKK7UpNBYfgcNXcRz6R9gyTHHfl3o5wzj5uHLKVLN1NwDyxhkFczkiSo8jRdL1qOu7YAPXnxbafqsTRiWBf3Eu1Hv5/g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.208.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-56b8e4f38a2so2951581a12.3; Fri, 22 Mar 2024 08:16:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711120580; x=1711725380; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=SMb2IgPKyZnj/ue62em5Q9KAY8/Lp0+DnO65BTLg4OM=; b=CoJ9mIHihB2kA/XJyUiSefUz0qvTLupzv8EU44zZw8l1kvolD71JaqF/9x1Ks7dS8c tSpDrWBRqoyRWjumtaoB1OwtFcrFefSx7IL4mU9RMcNDHk9sgqUCRd3QBDwPssNhu7PX D3PTg+ZzNvB2LSDFaNRfA9QaKgIFYgQjmNVQYTC6WzrK6S/3tVthRsZXHs0K2oMBchwp teSTqCBZ/0heRYk4CPf8Ayd7EYpW6iuhGpjYdqgzsCb6wADBQRCyDnY/peqlEt67Grz1 LhXCDVeww5oaGfaSY4BnmzlJLHaLVA44Bp0+J6s0kz07rf8UZFe1kpKfka66USAiYLq4 7kow== X-Forwarded-Encrypted: i=1; AJvYcCUzEcykoZ6I+tQ7lgSV4jvKqMFIl+3p7FXU7n9C7q9W1CzAnFbRpS/+1fCawgoXa2vIK+xaLQfXQcri76HFLhqKhFZlV6EEqlFurUEOzVo/efXRrat7Rwe5UWJSk/oHmVyKDahtNZsuEwOrJjA= X-Gm-Message-State: AOJu0Yz7QHfnRH92h7ggbCZ8Qj22u+tIlAESQX0aBZqwwcBC81aKKS0o ctzuouInbJp9+pxa/yafmLeUbesKq2PaRoq7Akw+TKdfk3AOvj1ppzVlpg8O X-Received: by 2002:a17:906:1843:b0:a46:f958:2eb6 with SMTP id w3-20020a170906184300b00a46f9582eb6mr1801147eje.67.1711120580209; Fri, 22 Mar 2024 08:16:20 -0700 (PDT) Received: from gmail.com (fwdproxy-lla-120.fbsv.net. [2a03:2880:30ff:78::face:b00c]) by smtp.gmail.com with ESMTPSA id oz27-20020a170906cd1b00b00a473490aae8sm543234ejb.24.2024.03.22.08.16.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 08:16:19 -0700 (PDT) Date: Fri, 22 Mar 2024 08:16:17 -0700 From: Breno Leitao To: Kalle Valo Cc: Jeff Johnson , kuba@kernel.org, keescook@chromium.org, "open list:NETWORKING DRIVERS (WIRELESS)" , "open list:QUALCOMM ATHEROS ATH11K WIRELESS DRIVER" , open list Subject: Re: [PATCH] wifi: ath11k: allocate dummy net_device dynamically Message-ID: References: <20240319185735.1268980-1-leitao@debian.org> <871q85as8e.fsf@kernel.org> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <871q85as8e.fsf@kernel.org> On Wed, Mar 20, 2024 at 04:32:49PM +0200, Kalle Valo wrote: > Breno Leitao writes: > > > Embedding net_device into structures prohibits the usage of flexible > > arrays in the net_device structure. For more details, see the discussion > > at [1]. > > > > Un-embed the net_device from struct ath11k_ext_irq_grp by converting it > > into a pointer. Then use the leverage alloc_netdev() to allocate the > > net_device object at ath11k_ahb_config_ext_irq() for ahb, and > > ath11k_pcic_ext_irq_config() for pcic. > > > > The free of the device occurs at ath11k_ahb_free_ext_irq() for the ahb > > case, and ath11k_pcic_free_ext_irq() for the pcic case. > > > > [1] https://lore.kernel.org/all/20240229225910.79e224cf@kernel.org/ > > > > Signed-off-by: Breno Leitao > > This crashes on my nuc x86 test box with WCN6855 hw2.0 when running > rmmod, stacktrace below. I used tag ath-202403201010 from my ath.git > tree as the baseline. Sorry that I'm not able to debug this further > right now. Thanks for the detailed log. I am trying to understood the issue, and I think we are deferring a null pointer, which is likely net_device->dev_addr. Here, dev->dev_addr seems to be NULL. > 27: 83 e6 07 and $0x7,%esi > 2a:* 42 0f b6 14 30 movzbl (%rax,%r14,1),%edx <-- trapping instruction In this case, and I understand RAX seems to be dev->addr, and R14 is the KASAN shadow: RAX = 0000000000000000 R14 = dffffc0000000000 (CONFIG_KASAN_SHADOW_OFFSET) So, we are clearly deferring a NULL pointer. Now, why? Not sure yet.