Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2565262rdb; Mon, 5 Feb 2024 10:15:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IEZYYK1RFjyDy3uJrwShAJ/tMVJv7qSnqRQcun/U7aCd9YKSLXWwH8/gWOfJdn0Q0pZxKRh X-Received: by 2002:a05:6122:2786:b0:4c0:2dd6:7823 with SMTP id el6-20020a056122278600b004c02dd67823mr331541vkb.9.1707156952894; Mon, 05 Feb 2024 10:15:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707156952; cv=pass; d=google.com; s=arc-20160816; b=R2S7BLPcc+uICgdwOYRxi4L5SvcVi5F2NgeW86SfP5OEf2wGkh8h4jBr5f6BNRuGGy +zkgQBN9hVeEBw21FQwRYmIN+hCem8TPmxdSoUCnkU9KXeyOBrk0H6ZnzrLwumuwI0TW EjlCZJsnNo7xui/wbXW7yHQMdY80Oc3UDxfkyQxUW24rWf8PGz/Tqhh1UKlRYmqbmXbp VBpawziaALqcWgiGIhNw+McKGd/Wmj6Pe3rNevoRMUsFTrSLelyGPDzsD+MPKLtHe90y z2OuAL7iiiwP8lKbrIyniWG3IzlXXNc127AZ0mxt4t21aTpwh3Z2UwlfvAugJp+Xz8AA dpTQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=hMMhCHPdnY6a53r0AdRn2ZwMuoekqmZTBFnKYjfzR8k=; fh=TjEUm0jdgPfmbWWL2oSaHp4suIK29jQ+nzYiUUUIbdQ=; b=XTD4+Hpo5ZENqqji8nSNXSegzV3KKW5ZgCO/eirCMrDaVsDXpikeMNM5HIKkPooTRX W2SBWnmE/2/duq8D8kIXw7+4tiwSIQxE7AlmKzcDD2p/Jlj83DK1MyTp2HLTv+ZOFt66 K7BeEBHosaoAnsY23vLJhfJxQPZ6VQx/mIaOXaxJLBqjF7/hC0oDt99kuaxLNQhNA5Po yXj4Xp8SP3vXU+uMGuFkFKKsbICMo5O6kY4+hPGjXXQvB+6zzmaMp+RM61mBItJ0T1rs Wbupi6BxMgMv+CoOFC1/H+iUhOcaDSy0QXg5w+oqgZAI2jIpVmUZBsX69IzSBc7cxjJR TI3g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=aqqnWbDj; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-53191-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53191-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=1; AJvYcCXUwFoPaEnXLn7VvdGESbEkxQqyR0TbIvqt+YyO2B0yoMdOVMJCafcutgi8eyBxoh6NJltkvluqyCy+r9y+Ze2zJYWkXyvzwY0FkdIbAA== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id e4-20020ad44184000000b0068c405115dbsi460681qvp.169.2024.02.05.10.15.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 10:15:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-53191-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=aqqnWbDj; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-53191-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53191-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 284E71C22FA7 for ; Mon, 5 Feb 2024 18:15:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 47FAC47F59; Mon, 5 Feb 2024 18:15:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="aqqnWbDj" Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (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 131F647F71 for ; Mon, 5 Feb 2024 18:15:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707156929; cv=none; b=m89JiCyC99VIsiZHSkWptXEA094okNgLnD1J7cRx30zM+79UOlFdYl8I7UFT8YBgXhgVBt7GJqW6QGZ2JkzlYfSNG3gtJE1GatVoC1nV0OFaDnuejN+eTzrraPEcJ+Cfzxr8Qgp0mLFLzZf6oj0xuRc0XPIQBx+qrYuNsmoRJD8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707156929; c=relaxed/simple; bh=FyCREsOOqtnuvOoqGa+Thr/EI1MAjxJC1gzLyFekjtk=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=DIWBP46NgW+Ts9DVOy4Cpws3merVnnM362+mMLpoziBnSxiF3EoI4l5C/AblPK60xj1I782iHHWoY3ZLPsNtIwGLvF3kewBkUrNL4uQKXX6HXFmlaJrUdhASecY8bmvyqFbuw+PTVi6wTCunGpN5SuTlECqPurc/cXgr3IaiX8g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=aqqnWbDj; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1d93b982761so32795ad.0 for ; Mon, 05 Feb 2024 10:15:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1707156927; x=1707761727; darn=vger.kernel.org; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=hMMhCHPdnY6a53r0AdRn2ZwMuoekqmZTBFnKYjfzR8k=; b=aqqnWbDjvZTJQ4w9J32nnn5C4bBIeOz/x/0V8+U9GHmQLEvt2B+6uMA5aCawO/MAIK E63FooVEqrNtYkHh1lSIONbgLUzFf/gu0GdQl12dhS8AWvcc50f+lLJnNKDeEsPmrAYg 39i+YfU3vy/e9lKrUyWmzN5D0qDfcJdbfY4CJZZgADFQj8/698EADEIA/BDFQIsnBtgj EHYO9/6+PusZIq7ByU8RFN1x1fHFyuYtGfdnezcRemOBQ3zRqn+I38JnhAGzkWqejiFy 1mNHFpaVKnOzmJ9uc24myJpH8MKwxV8faSn72MLXxpjAkgmg3T1GIzhnScVOL92i1c8F GhKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707156927; x=1707761727; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hMMhCHPdnY6a53r0AdRn2ZwMuoekqmZTBFnKYjfzR8k=; b=irNlbmYNKLi+q/Y0BPQen/6u1wX+Dh5Ur/XXm98FIBkedzRqv0pDwCpVyqfJUaPnD2 TswBq5/2mWY/dKULZdTJvQHKuW1U01vmiiTagEs9ZesYYOLywHcYHaV/apoGmQvd/Ngx BZ4bWwuS+GIjytcE7IIKGwBTdn3IB1E87OKQ9CiB6iRtX3Dg8pH87TRIE4OCiquge0tV IThmYxnTkq3jPXeQI3bBBsksbHSv8CaV8qmnX72SPgzMgdYF+pfg9SyHAy4V4wLs1t+Q b+tu2n/CHaDa+zH4JhufOHB0nE2IInD4M8WU6QY5ZsrNQnP+qyGQHHTzWm27P55oAqX+ Ewmg== X-Gm-Message-State: AOJu0YyHiJLjJH2+ke8Ke4jHzU7R3nPFNyz7dE9v2Dn1Z+c2pHKwrsV9 66u0hEo0EFRVkTtADilzR5RgUKFEKXFgsIhRt0xxhyKio/WLrBnbnIiwzUhP6g== X-Received: by 2002:a17:903:22c4:b0:1d9:7a7a:3cf6 with SMTP id y4-20020a17090322c400b001d97a7a3cf6mr27342plg.12.1707156927140; Mon, 05 Feb 2024 10:15:27 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUpktWhh0NPQ9FcoM14zHXRSVA+RTqr1vPpQx8XPTdbH/a9BsBmFFWsoICE46TUKEz2jnUcs0RApYUBIZO3cT84iftmz8MttslQPRRdCYheYhXIe6a8hD1DwQlwkCsTYZnlHAbBRnlI8tntWDUXpCoiJ4Ken8Pr+/0KjyKOIAhjGiomQTQRlXCWtaCsPPcC+JIrdNOLcNagrcQTtqRKcttUEj55yLcKaYXkHiEgvvcHdB6EAdtODlFokODt1vWmC2pvRz7B0RQhLIpQYdsQbc8WLgjK Received: from [2620:0:1008:15:1e99:232a:d721:3dff] ([2620:0:1008:15:1e99:232a:d721:3dff]) by smtp.gmail.com with ESMTPSA id ka5-20020a170903334500b001d8edfec673sm159673plb.214.2024.02.05.10.15.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 10:15:26 -0800 (PST) Date: Mon, 5 Feb 2024 10:15:25 -0800 (PST) From: David Rientjes To: Robin Murphy cc: joro@8bytes.org, will@kernel.org, pasha.tatashin@soleen.com, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, linux-mm@kvack.org, yosryahmed@google.com, john.g.garry@oracle.com Subject: Re: [PATCH v3 1/3] iommu/iova: Tidy up iova_cache_get() failure In-Reply-To: Message-ID: <9a779ae8-c965-b2b0-6f94-865f49ed0e9b@google.com> References: 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=US-ASCII On Mon, 5 Feb 2024, Robin Murphy wrote: > Failure handling in iova_cache_get() is a little messy, and we'd like > to add some more to it, so let's tidy up a bit first. By leaving the > hotplug handler until last we can take advantage of kmem_cache_destroy() > being NULL-safe to have a single cleanup label. We can also improve the > error reporting, noting that kmem_cache_create() already screams if it > fails, so that one is redundant. > > Signed-off-by: Robin Murphy Much easier to follow :) Acked-by: David Rientjes