From: Dan Carpenter <dan.carpenter@oracle.com>
To: Ralph Campbell <rcampbell@nvidia.com>
Cc: "Jérôme Glisse" <jglisse@redhat.com>,
"Jason Gunthorpe" <jgg@ziepe.ca>,
"Wei Yongjun" <weiyongjun1@huawei.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] mm/hmm/test: use after free in dmirror_allocate_chunk()
Date: Thu, 24 Sep 2020 13:47:09 +0000 [thread overview]
Message-ID: <20200924134709.GK4282@kadam> (raw)
In-Reply-To: <c25729e4-8a53-07e3-ae98-d77919f3ac21@nvidia.com>
On Tue, Sep 22, 2020 at 10:31:01AM -0700, Ralph Campbell wrote:
> > @@ -471,30 +487,16 @@ static bool dmirror_allocate_chunk(struct dmirror_device *mdevice,
> > sizeof(new_chunks[0]) * new_capacity,
> > GFP_KERNEL);
> > if (!new_chunks)
>
> Need to call mutex_unlock(&mdevice->devmem_lock).
> In fact, why not make this goto err_unlock and add
> err_unlock: mutex_unlock() before the err_release:.
Ugh... Thanks for catching that.
regards,
dan carpenter
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Ralph Campbell <rcampbell@nvidia.com>
Cc: "Jérôme Glisse" <jglisse@redhat.com>,
"Jason Gunthorpe" <jgg@ziepe.ca>,
"Wei Yongjun" <weiyongjun1@huawei.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] mm/hmm/test: use after free in dmirror_allocate_chunk()
Date: Thu, 24 Sep 2020 16:47:09 +0300 [thread overview]
Message-ID: <20200924134709.GK4282@kadam> (raw)
In-Reply-To: <c25729e4-8a53-07e3-ae98-d77919f3ac21@nvidia.com>
On Tue, Sep 22, 2020 at 10:31:01AM -0700, Ralph Campbell wrote:
> > @@ -471,30 +487,16 @@ static bool dmirror_allocate_chunk(struct dmirror_device *mdevice,
> > sizeof(new_chunks[0]) * new_capacity,
> > GFP_KERNEL);
> > if (!new_chunks)
>
> Need to call mutex_unlock(&mdevice->devmem_lock).
> In fact, why not make this goto err_unlock and add
> err_unlock: mutex_unlock() before the err_release:.
Ugh... Thanks for catching that.
regards,
dan carpenter
next prev parent reply other threads:[~2020-09-24 13:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-22 8:12 [PATCH] mm/hmm/test: use after free in dmirror_allocate_chunk() Dan Carpenter
2020-09-22 8:12 ` Dan Carpenter
2020-09-22 17:31 ` Ralph Campbell
2020-09-22 17:31 ` Ralph Campbell
2020-09-24 13:46 ` [PATCH v2] " Dan Carpenter
2020-09-24 13:46 ` Dan Carpenter
2020-09-24 19:25 ` Ralph Campbell
2020-09-24 19:25 ` Ralph Campbell
2020-09-24 13:47 ` Dan Carpenter [this message]
2020-09-24 13:47 ` [PATCH] " Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200924134709.GK4282@kadam \
--to=dan.carpenter@oracle.com \
--cc=jgg@ziepe.ca \
--cc=jglisse@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rcampbell@nvidia.com \
--cc=weiyongjun1@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.