Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5276512ybe; Tue, 17 Sep 2019 05:42:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxUIzJL4VJ/YtFBTkZ4JAkZHa3u4WEEWritR1dEzmQ8QzWTydbvbI2zD+iBEmUjVV6Idt0g X-Received: by 2002:aa7:c24c:: with SMTP id y12mr4494115edo.120.1568724129654; Tue, 17 Sep 2019 05:42:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568724129; cv=none; d=google.com; s=arc-20160816; b=nnis7TJzBEZNGbMyNwgnuhsm7QwDblykh+95hlG/UTGNPT96FD9BVh4RR+5P1xXdFl FM+6kSRGegqFHgEvl85dVIgUKEWH2uAuRLGlNhS46p4+tzJrBZBkZIQKyVWiunmlJ0oZ U04MHMawCXvHR5eEkBGb04H5m4bZ1NY+JbbwFn+FouQ2QAB155UOS789hv0A4zgMAS10 d35v/0d+zhXe4uDdaVBMW1hXNXQarpeOw0C3eU/9HhC1kZn1QKwHlvJdPf/t4LZrZlcm Rcm4hAOJw3ZwSNGTtBpgBXhm2qqNHgzCGWHUqvh+dJO9A+yCLOJs3WUonbv9f1fJEYXy /dLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=DBpjA0TXWQyxBSa+HOXa/WtKeSwwFZ9arQe/iiRq1kw=; b=g0KerS0t3grgVq1iP5dCYGNgyGQWJC5skf72E82oNkTdZyPDibXoZUm/3FDjxWzLfE X1Y0U8Suor0hnBuLN6kmg1PRD5uo/RTusdZiTrsjyHUC8iBQ1yoJKeEpPCvX+2t8mA7X TzwCDaslAyHsKf4M1We2SbwNpIkREEJntmaLQSN25+1Ljx/P3MGgqWjvz2K9chMaBWXC h7jjAQfEU02MksZBA5YLk+uvmBNvQ//6t5kdjgOwRyWprzkcNGdPEbVFzifyby3RBU6M dKpotxBdgofhGafW+oj6chmsWS6aMXG9JXHFGGXktik4iiAx9HlTbau8wKX5vBlO8XXe 4ySw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fy7si1007026ejb.13.2019.09.17.05.41.36; Tue, 17 Sep 2019 05:42:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728138AbfIQMk2 (ORCPT + 99 others); Tue, 17 Sep 2019 08:40:28 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:34036 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728123AbfIQMk2 (ORCPT ); Tue, 17 Sep 2019 08:40:28 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.0.7]) by fornost.hmeau.com with smtp (Exim 4.89 #2 (Debian)) id 1iACmL-0008IP-Ik; Tue, 17 Sep 2019 22:40:22 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Tue, 17 Sep 2019 22:40:18 +1000 Date: Tue, 17 Sep 2019 22:40:18 +1000 From: Herbert Xu To: Laurent Vivier Cc: linux-kernel@vger.kernel.org, Amit Shah , linux-crypto@vger.kernel.org, Matt Mackall Subject: Re: [PATCH] hw_random: don't wait on add_early_randomness() Message-ID: <20190917124018.GA32437@gondor.apana.org.au> References: <20190917095450.11625-1-lvivier@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190917095450.11625-1-lvivier@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, Sep 17, 2019 at 11:54:50AM +0200, Laurent Vivier wrote: > add_early_randomness() is called by hwrng_register() when the > hardware is added. If this hardware and its module are present > at boot, and if there is no data available the boot hangs until > data are available and can't be interrupted. > > To avoid that, call rng_get_data() in non-blocking mode (wait=0) > from add_early_randomness(). > > Signed-off-by: Laurent Vivier > --- > drivers/char/hw_random/core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Please provide more context in your patch description such as which driver actually causes a hang here. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt