[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CALAqxLW-Z3-Zcwkeuard5vfU_bAZkRRsAo2fX=3Wwp2-yURiuA@mail.gmail.com>
Date: Fri, 22 Jan 2021 14:35:07 -0800
From: John Stultz <john.stultz@...aro.org>
To: Suren Baghdasaryan <surenb@...gle.com>
Cc: Sumit Semwal <sumit.semwal@...aro.org>,
lkml <linux-kernel@...r.kernel.org>,
Liam Mark <lmark@...eaurora.org>,
Laura Abbott <labbott@...nel.org>,
Brian Starkey <Brian.Starkey@....com>,
Hridya Valsaraju <hridya@...gle.com>,
Sandeep Patil <sspatil@...gle.com>,
Daniel Mentz <danielmentz@...gle.com>,
Chris Goldsworthy <cgoldswo@...eaurora.org>,
Ørjan Eide <orjan.eide@....com>,
Robin Murphy <robin.murphy@....com>,
Ezequiel Garcia <ezequiel@...labora.com>,
Simon Ser <contact@...rsion.fr>,
James Jones <jajones@...dia.com>,
"open list:DMA BUFFER SHARING FRAMEWORK"
<linux-media@...r.kernel.org>,
DRI mailing list <dri-devel@...ts.freedesktop.org>
Subject: Re: [RESEND][PATCH 2/3] dma-buf: heaps: Add a WARN_ON should the
vmap_cnt go negative
On Fri, Jan 22, 2021 at 2:21 PM Suren Baghdasaryan <surenb@...gle.com> wrote:
> On Thu, Jan 21, 2021 at 11:56 PM Sumit Semwal <sumit.semwal@...aro.org> wrote:
> > On Wed, 20 Jan 2021 at 02:15, John Stultz <john.stultz@...aro.org> wrote:
> > >
> > > We shouldn't vunmap more then we vmap, but if we do, make
> > > sure we complain loudly.
> >
> > I was checking the general usage of vunmap in the kernel, and I
> > couldn't find many instances where we need to WARN_ON for the vunmap
> > count more than vmap count. Is there a specific need for this in the heaps?
>
> Hi Sumit,
> My worry was that buffer->vmap_cnt could silently go negative. But if
> this warning is not consistent with other places we do refcounted
> vmap/vunmap then feel free to ignore my suggestion.
>
Yea,
My sense is that it didn't seem like it would hurt, and if the
warning happened to be tripped, it would be good to catch.
However, if you are skeptical, feel free to drop that patch from this
series for now (it shouldn't impact the following patches).
thanks
-john
Powered by blists - more mailing lists