From: Mark Frazer <mark@mjfrazer.org>
To: Linux Kernel List <linux-kernel@vger.kernel.org>
Subject: Missing up_read after get_user_pages in arch/i386/lib/usercopy.c?
Date: Thu, 18 Dec 2003 00:02:49 -0500 [thread overview]
Message-ID: <20031218000249.A25268@mjfrazer.org> (raw)
Just browsing users of get_user_pages today and noticed what might be a
bug.
===== arch/i386/lib/usercopy.c 1.15 vs edited =====
--- 1.15/arch/i386/lib/usercopy.c Thu Aug 21 01:31:58 2003
+++ edited/arch/i386/lib/usercopy.c Wed Dec 17 23:59:16 2003
@@ -541,8 +541,10 @@
goto survive;
}
- if (retval != 1)
+ if (retval != 1) {
+ up_read(¤t->mm->mmap_sem);
break;
+ }
maddr = kmap_atomic(pg, KM_USER0);
memcpy(maddr + offset, from, len);
--
Like most of life's problems, this one can be solved with bending. - Bender
next reply other threads:[~2003-12-18 5:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-18 5:02 Mark Frazer [this message]
2003-12-18 5:25 ` Linus Torvalds
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=20031218000249.A25268@mjfrazer.org \
--to=mark@mjfrazer.org \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®