From mboxrd@z Thu Jan 1 00:00:00 1970 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 47BA51487E5; Mon, 16 Dec 2024 14:51:03 +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=1734360663; cv=none; b=SldAx4EYkASCfIsAeXDUOk+oi6dglmZ6JUHAIWcfMDiUwP8z/l8P2CjJggTH6Ej9hZ1VeS/iaVjrl8Io8PDPj33Jh214Y6iXM/BGKkxN5p7AJmDei9a/xhELlSoTlQo/SgET001s2kcPV4izikcp5A7WcvWEfMw6Y+6TK0SglR4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734360663; c=relaxed/simple; bh=XTXuUO4aBKnsu6RlrhoKNi7uAGfKpJaoy/LLiehShL4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=jFm0btGpC+UEi0/KnYt5HZTi5nt8ukYi/QsS/7SvikT+ifv+Ds0NP118bu6cIZnfUoVnSvk/fs9xBGkzgA/EP9JxyuOMw3eWw1h0gj/b7So+jdyTVEU9uZKj1nlTB9JCR0GLPlFe2cB9wVfEBf7nUjcWvZn5m2DwJIUFMwA4k5I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RvnLNeYD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RvnLNeYD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F105BC4CED0; Mon, 16 Dec 2024 14:50:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1734360662; bh=XTXuUO4aBKnsu6RlrhoKNi7uAGfKpJaoy/LLiehShL4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=RvnLNeYDgZc69r1Wb+U+sa1LklxVpJgX3RCE3Zq3sx3jMiesF49M82A0w46y05CH4 Bn93v93TrxhFbRxps5Fry23So0WIlaNH5Jqm8HKDdcKJHhUk7KRKqFjCHMnXFE0A3Z FHg3k7ypk4oQgxGNAcVsEyTGNXcGhYEG9tnE5kcezoRZ8ORELKe6TQ5CPJV9J81il1 QQsgEV5hWXuVfGQp4+zoDxIFUBWN50yHGcJrJfAB5b6fTNlfv++F/lLPXu1ElRxkBz 33Asya4gTt9/l6Eu2uiook4CPdj3WJShVtM5yQuS8kGoleAuwcUIb2KGkX+RjjqtjL DYvN7t+2ZLdxg== From: Andreas Hindborg To: "Alice Ryhl" Cc: "Miguel Ojeda" , "Matthew Wilcox" , "Lorenzo Stoakes" , "Vlastimil Babka" , "John Hubbard" , "Liam R. Howlett" , "Andrew Morton" , "Greg Kroah-Hartman" , "Arnd Bergmann" , "Christian Brauner" , "Jann Horn" , "Suren Baghdasaryan" , "Alex Gaynor" , "Boqun Feng" , "Gary Guo" , =?utf-8?Q?Bj=C3=B6rn?= Roy Baron , "Benno Lossin" , "Trevor Gross" , , , Subject: Re: [PATCH v11 5/8] mm: rust: add mmput_async support In-Reply-To: <20241211-vma-v11-5-466640428fc3@google.com> (Alice Ryhl's message of "Wed, 11 Dec 2024 10:37:09 +0000") References: <20241211-vma-v11-0-466640428fc3@google.com> <20241211-vma-v11-5-466640428fc3@google.com> Date: Mon, 16 Dec 2024 14:10:47 +0100 Message-ID: <87seqnai3s.fsf@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain "Alice Ryhl" writes: > Adds an MmWithUserAsync type that uses mmput_async when dropped but is > otherwise identical to MmWithUser. This has to be done using a separate > type because the thing we are changing is the destructor. > > Rust Binder needs this to avoid a certain deadlock. See commit > 9a9ab0d96362 ("binder: fix race between mmput() and do_exit()") for > details. It's also needed in the shrinker to avoid cleaning up the mm in > the shrinker's context. > > Acked-by: Lorenzo Stoakes (for mm bits) > Signed-off-by: Alice Ryhl Reviewed-by: Andreas Hindborg Best regards, Andreas Hindborg