[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180706131611.h3w2kdinmjguikgo@8bytes.org>
Date: Fri, 6 Jul 2018 15:16:11 +0200
From: Joerg Roedel <joro@...tes.org>
To: Dmitry Safonov <dima@...sta.com>
Cc: linux-kernel@...r.kernel.org,
David Woodhouse <dwmw2@...radead.org>,
iommu@...ts.linux-foundation.org,
Dmitry Safonov <0x7f454c46@...il.com>
Subject: Re: [RFC 0/3] iommu/iova: Unsafe locking in find_iova()
On Thu, Jun 21, 2018 at 07:08:20PM +0100, Dmitry Safonov wrote:
> find_iova() looks to be using a bad locking practice: it locks the
> returned iova only for the search time. And looking in code, the
> element can be removed from the tree and freed under rbtree lock. That
> happens during memory hot-unplug and cleanup on module removal. Here
> I cleanup users of the function and delete it.
But this is only a problem if more than one code-path uses tries to
handle a given iova at the same time, no?
Regards,
Joerg
Powered by blists - more mailing lists