Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6322574iog; Thu, 23 Jun 2022 16:48:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vC8AaY89agBfHHNJMVgmdV+smmzLzVk12ChgN1HNFxL3Gp+cw8UsHLWw+EnwjjqwcDYy49 X-Received: by 2002:a17:907:97c4:b0:711:ea9a:103b with SMTP id js4-20020a17090797c400b00711ea9a103bmr11332988ejc.155.1656028129216; Thu, 23 Jun 2022 16:48:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656028129; cv=none; d=google.com; s=arc-20160816; b=nF02YqDvRMxEgogkdUmwicIS+MJDjvT4NnLLrhJpVF7rlEwiVxt+bDfZ9F204CcTCt oto9Hcx/U7Bwgiz5yk2wGBq69bLVLCVs7y3WULTluqMAbTeejb0s5qxuuG40Y/iJDfvx 80c6KTFGQb5kXblM62GUKq/OewRFi2h+BS5lLQYNqjFGUX5M4OE3kNoFWMAbsKY4r2Uj 7a1iQTOJqBdLTOE66fIyzXllSOMvGteximW9dgbJ65P4/LQYD9AUU9NgjTqTANBNzvxv U54gU0YsTKTo5bnC/jpBrl32K4vCJV1NyRxlb/7zEshjl2E2VW/uxnWfqK64zye/Pm9k 51cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=lzRYNEve/L7J3c5x1SgnuNfzDWVvderbcOvcfCQAlj0=; b=xhbJ/YsZPpfKTI21xEUgwEESKb9k0OhdDT62TMVN+kRQgstbKU2fimL9mW09U0Esin DEoPoPH+BkE5eegp8ho9EXrtiKmM7qCFU/UOg2c8XgFwAApnKa0lgzq9Teo38CFP/Dih olnFNETNpOoSGHVJCk7tZlK04EgE8wgJukWFjMt8QmhzfSuWeOjCBmuI1SFfVAPGZ/1S iYb/5fWu1Ka1YvQFf+ee8+JwELrwYOJkPGPKrapQ2Y5qRQ/nzv1EFd4FYG6nHcVOBJzv BL1WYq9aztYfUaZx1mLIpWozLwSpfUfVfv9lNyH0QrMx5oV4LFU6eS+OyY1PVnQ4Agw5 BkaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=F5U9Ufgs; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x4-20020a50ba84000000b004357856d02dsi1193535ede.529.2022.06.23.16.48.32; Thu, 23 Jun 2022 16:48:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=F5U9Ufgs; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229669AbiFWXrz (ORCPT + 65 others); Thu, 23 Jun 2022 19:47:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229887AbiFWXry (ORCPT ); Thu, 23 Jun 2022 19:47:54 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3C63314; Thu, 23 Jun 2022 16:47:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 69885B8251D; Thu, 23 Jun 2022 23:47:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8176C341C7; Thu, 23 Jun 2022 23:47:49 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="F5U9Ufgs" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1656028067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=lzRYNEve/L7J3c5x1SgnuNfzDWVvderbcOvcfCQAlj0=; b=F5U9Ufgsc8Qm981bfzZoC1lBbfXyu6FOWOTWMpN3Ba+RaH/nBnjlFyC8t78KgSNHyvWBRX qLPFMa+4Oixjic3CphAzZKscS5rxqvYJyBy7W/mZqB8gQfWaKRxF3s+9H8vdFU4OyHuaKB i2x73P7NHFX+j7xUZkP26AuRP4yqBdY= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 721ab2a9 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Thu, 23 Jun 2022 23:47:47 +0000 (UTC) Received: by mail-io1-f52.google.com with SMTP id m13so1160256ioj.0; Thu, 23 Jun 2022 16:47:47 -0700 (PDT) X-Gm-Message-State: AJIora8AmRgfWI853WSWkLlfXE6bTx642kKzWlxJ1yeStBizZS05Gizy hk+rHuYndEz0cn48CRVOH+CBgxRDoDHaMcSYTXU= X-Received: by 2002:a02:8568:0:b0:339:c51c:867 with SMTP id g95-20020a028568000000b00339c51c0867mr6868253jai.170.1656028066438; Thu, 23 Jun 2022 16:47:46 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Jason A. Donenfeld" Date: Fri, 24 Jun 2022 01:47:35 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: ath9k: hwrng blocks for several minutes when phy is un-associated To: Gregory Erwin Cc: Rui Salvaterra , Linux Crypto Mailing List , linux-wireless Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hey Gregory, On Fri, Jun 24, 2022 at 1:36 AM Gregory Erwin wrote: > > No luck. > > The first patch caused a warning and oops with ath9k_rng_read() at the > top of the call stack when reading from /dev/hwrng: > WARNING: CPU: 1 PID: 454 at kernel/kthread.c:75 kthread_should_stop+0x2a/0x30 > BUG: kernel NULL pointer dereference, address: 0000000000000000 > > The second didn't have a noticeable effect, for better or worse. Alright. That's actually getting us somewhere. So the path in question here is from reading /dev/hwrng, not from the kthread that's doing the same read. Can you do a `cat /dev/hwrng > /dev/null`, and then do whatever it is you do that causes everything to hang, and then while things are hung in the bad way, look at the contents of /proc/[the pid of the cat you just ran]/stack? Jason