[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <184163e9-01d4-dcc5-0adf-a3d175e56f16@gmail.com>
Date: Tue, 29 Sep 2020 20:42:52 +0300
From: Dmitry Osipenko <digetx@...il.com>
To: Nicolin Chen <nicoleotsuka@...il.com>, thierry.reding@...il.com,
joro@...tes.org
Cc: vdumpa@...dia.com, jonathanh@...dia.com,
linux-tegra@...r.kernel.org, iommu@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org, hch@...radead.org
Subject: Re: [PATCH v4 2/2] iommu/tegra-smmu: Expand mutex protection range
29.09.2020 09:13, Nicolin Chen пишет:
> This is used to protect potential race condition at use_count.
> since probes of client drivers, calling attach_dev(), may run
> concurrently.
>
> Signed-off-by: Nicolin Chen <nicoleotsuka@...il.com>
> ---
It's always better not to mix success and error code paths in order to
keep code readable, but not a big deal in the case of this particular
patch since the changed code is quite simple. Please try to avoid doing
this in the future patches.
Also, please note that in general it's better to use locked/unlocked
versions for the functions like it's already done for
tegra_smmu_map/unmap, this will remove the need to maintain lockings in
the code. The code touched by this patch doesn't have complicated code
paths, so it's good enough to me.
Reviewed-by: Dmitry Osipenko <digetx@...il.com>
Powered by blists - more mailing lists