From: akpm@linux-foundation.org
To: mm-commits@vger.kernel.org, rcampbell@nvidia.com,
jglisse@redhat.com, rdunlap@infradead.org
Subject: + lib-fix-test_hmmc-reference-after-free.patch added to -mm tree
Date: Sat, 20 Jun 2020 19:21:28 -0700 [thread overview]
Message-ID: <20200621022128.roPc6%akpm@linux-foundation.org> (raw)
The patch titled
Subject: lib: fix test_hmm.c reference after free
has been added to the -mm tree. Its filename is
lib-fix-test_hmmc-reference-after-free.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/lib-fix-test_hmmc-reference-after-free.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/lib-fix-test_hmmc-reference-after-free.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Randy Dunlap <rdunlap@infradead.org>
Subject: lib: fix test_hmm.c reference after free
Coccinelle scripts report the following errors:
lib/test_hmm.c:523:20-26: ERROR: reference preceded by free on line 521
lib/test_hmm.c:524:21-27: ERROR: reference preceded by free on line 521
lib/test_hmm.c:523:28-35: ERROR: devmem is NULL but dereferenced.
lib/test_hmm.c:524:29-36: ERROR: devmem is NULL but dereferenced.
Fix these by using the local variable 'res' instead of devmem.
Link: http://lkml.kernel.org/r/c845c158-9c65-9665-0d0b-00342846dd07@infradead.org
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Ralph Campbell <rcampbell@nvidia.com>
Cc: Jérôme Glisse <jglisse@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
lib/test_hmm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/lib/test_hmm.c~lib-fix-test_hmmc-reference-after-free
+++ a/lib/test_hmm.c
@@ -520,8 +520,7 @@ static bool dmirror_allocate_chunk(struc
err_free:
kfree(devmem);
err_release:
- release_mem_region(devmem->pagemap.res.start,
- resource_size(&devmem->pagemap.res));
+ release_mem_region(res->start, resource_size(res));
err:
mutex_unlock(&mdevice->devmem_lock);
return false;
_
Patches currently in -mm which might be from rdunlap@infradead.org are
lib-fix-test_hmmc-reference-after-free.patch
reply other threads:[~2020-06-21 2:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200621022128.roPc6%akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=jglisse@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=rcampbell@nvidia.com \
--cc=rdunlap@infradead.org \
/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.