Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp586217lqt; Fri, 19 Apr 2024 05:05:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWVJkSp1QqKJVJF2LJe3QN7FX2VbIyqK62E8bp2cXxK8ZmGJl0INKxLwlzPDzzh6H/E75g6ruEaQdcNNqXfOduzARNaR5O915JqS4niYw== X-Google-Smtp-Source: AGHT+IEYdM+AkVmmN/u8aJxR+3ZkraVQMPJoekDBoojHiTeT2hjEKE6EtFFAtLgIgqz+HD1M3Hco X-Received: by 2002:a05:620a:3904:b0:78b:bf9c:e007 with SMTP id qr4-20020a05620a390400b0078bbf9ce007mr2417894qkn.68.1713528343438; Fri, 19 Apr 2024 05:05:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713528343; cv=pass; d=google.com; s=arc-20160816; b=n86dG+mkLgRO5hR1OBrO8MLV92qaUlYHAk+51V21DRTHDddxYya8pjRiWBpxdIPA/p mNNDwiVZRPwm3uJkjCdpmqHoMAbC2jhIONpY3ubJiK2ky655gpp45O3B2/MgauxOn1Y8 rtrUIcGYEaxfX3aObN44FFDTO7FJwzOt5ZvaJL0fhCwaaMI1RRXt8oxjnCsATKgbJvpo q8M6P31PW+xci9Msn/EHh5cPiuIm+vSzhC92aNvklfWMAoaiRNZKKsW9JnpCbsJ8ebUZ Bc52Ap+Kb8wMvCQOEANTPN1Rbqv8Gv/5tHwzxt4Uojv8UShiB5gSV0EDU+yPqMvu2s/l VP4A== 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:dkim-signature; bh=sgvA+pX3m076VODfdVT5T36t6N6KpW3H7jte1/zPwIo=; fh=k9mYeTSFf0HcQrgJuFP7xrG3Pg6aOcvLT1Pu6TDt6Bs=; b=bFCziObPYzBfix3H4RDtkFzM4lVIseSe++OCmVW4k6l0BOFPp8Ci8/z+rtT3XypWpF N/6Nb8SQIYuwsIBOxFEzA0qCEnwwNizNk924BzP0C1KlYcRqneuP+3vd2TVS92dkmDLD +ylk64do1qs21WK0aDhbB2suj4TIJYkeoL+QNl2MMlWdWIS3TwGqCzNMxy0++Vd72RKT EQ/tD1/LvZFk/I1hn3O2/s7hPjgzUZXGaItaIYmNObA3dNFRMNBkQx8KWshn30qTw9Qa qp5p1isa0AL7/JgDJfVbpW2JVKPGu625DC4JaPWL+IZkOeJdUdiUmcVLEF+MgGR1yb8w DjYw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=UlyzfiaU; arc=pass (i=1 dkim=pass dkdomain=zx2c4.com); spf=pass (google.com: domain of linux-kernel+bounces-151393-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151393-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id vu19-20020a05620a561300b0078bcec2939asi3755773qkn.38.2024.04.19.05.05.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 05:05:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151393-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=UlyzfiaU; arc=pass (i=1 dkim=pass dkdomain=zx2c4.com); spf=pass (google.com: domain of linux-kernel+bounces-151393-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151393-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 28EE81C20EF6 for ; Fri, 19 Apr 2024 12:05:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 17BF384A5A; Fri, 19 Apr 2024 12:05:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="UlyzfiaU" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B5CF83A14 for ; Fri, 19 Apr 2024 12:05:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713528334; cv=none; b=TvhW8fprvMJoCxTS/mV0AOeRlK7F+NIvvF4vAVrkmwokGvTyfR/vtjLHAXfMn+dVatXfuqqeX5etdd/4TWOg9L+AgsKJzok3QQJfhOdxltl2L+mXnIOa155n9cyLrIsK1Bd2gQa4mRi94hZPx6emWzFOtk56BhxJOY/7ZTvcyjc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713528334; c=relaxed/simple; bh=ZU1UTErqJhURgPa83kN0OX69TojMNxE5N8eAscWh5OU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tPMmfMUgfJcPbEaVIhwr17GRqeHoE8MMsjzqcNlxhx9QK2v5H+IQcpuf9n1G2TQ6tGGobDjEmUroa6wp9IyYqH+L3ofIImnK3FlzfbK5NcWFisF7vXIhKJ3J84ggzZBD9pUh5Eu29Aox00oHrDu5B5BtrF/rmlx/BkU+otOp4qA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b=UlyzfiaU; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F06DC2BD10; Fri, 19 Apr 2024 12:05:32 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="UlyzfiaU" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1713528329; 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=sgvA+pX3m076VODfdVT5T36t6N6KpW3H7jte1/zPwIo=; b=UlyzfiaUf6CZ0D9OZ0DeUkyUqT80dx11ttf/Yb8RUie94AXuNtvwKEe6G2hGrh+8QT79dG QjiYRvF/B0sBcrvPUmofvfHKeKZFnnMSUhMYwxJHhuhRl4NFIi3PQWK7iAMTn5v3aWGOVv NQ+8z0gBddlE3ed43SExJbVJGnasKKM= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 0db50ce3 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 19 Apr 2024 12:05:29 +0000 (UTC) Date: Fri, 19 Apr 2024 14:05:28 +0200 From: "Jason A. Donenfeld" To: Guoyong Wang Cc: Theodore Ts'o , Tejun Heo , Lai Jiangshan , Matthias Brugger , AngeloGioacchino Del Regno , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, wsd_upstream@mediatek.com Subject: Re: [PATCH v2] random: Fix the issue of '_might_sleep' function running in an atomic contex Message-ID: References: <20240419105453.5440-1-guoyong.wang@mediatek.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20240419105453.5440-1-guoyong.wang@mediatek.com> On Fri, Apr 19, 2024 at 06:54:53PM +0800, Guoyong Wang wrote: > In the case that a delay is acceptable for 'crng_set_ready', it can be > deferred to a workqueue in order to accommodate different contexts. > > Signed-off-by: Guoyong Wang > --- > v2: Compared to version 1, version 2 has removed the definition of > 'execute_in_non_atomic_context' and always uses a workqueue to execute > 'crng_set_ready'. > > Send out the patch again for further discussion. > > [1]: https://patchwork.kernel.org/patch/13595066 Sorry, but this doesn't make sense in terms of how kernel development is typically done: 1) Before you sent this, I told you there was no need for a v2. 2) The removal snippet at the bottom applies to your previous v1, not to upstream code. 3) The other snippet is taken verbatim from a patch that I posted. 4) That snippet is already upstream: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e871abcda3b67d0820b4182ebe93435624e9c6a4 There is no further work to do on this. Thank you for reporting the bug - very appreciated - and for discussing the fix. But now we have a fix. So everything is all set and there's nothing else to do and everyone can be happy. Jason