From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Dmitry Safonov <dsafonov@virtuozzo.com>
Cc: linux-kernel@vger.kernel.org, 0x7f454c46@gmail.com,
"Al Viro" <viro@zeniv.linux.org.uk>,
"Arve Hjønnevåg" <arve@android.com>,
"Riley Andrews" <riandrews@android.com>,
devel@driverdev.osuosl.org,
"Android Kernel Team" <kernel-team@android.com>
Subject: Re: [PATCH] binder: Drop needless locking in binder_mmap()
Date: Mon, 17 Jul 2017 14:52:19 +0200 [thread overview]
Message-ID: <20170717125219.GA20205@kroah.com> (raw)
In-Reply-To: <723538c0-bee9-cf15-7dd9-6ddaebdd6b4e@virtuozzo.com>
On Mon, Jun 19, 2017 at 05:53:34PM +0300, Dmitry Safonov wrote:
> On 05/24/2017 05:51 PM, Dmitry Safonov wrote:
> > binder_mmap() protected proc->buffer from concurrent changes.
> > It was introduced with commit bd1eff9741af ("Staging: android: binder:
> > Fix crashes when sharing a binder file between processes").
> >
> > The commit fixed such races alike:
> >
> > task1
> > =====
> > fd = open("/dev/binder",..)
> > fork()
> > ---------------------------------------->task2
> > | =====
> > mmap(fd) mmap(fd)
> >
> > Afterwards the situation was changed with the commit a79f41ed9786
> > ("binder: don't allow mmap() by process other than proc->tsk").
> > That commit prohibited mmap'ing of fd, that was opened by some
> > other task.
> > That restriction has made locking in binder_mmap() unnecessary.
> >
> > Cc: Al Viro <viro@zeniv.linux.org.uk>
> > Cc: "Arve Hjønnevåg" <arve@android.com>
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Cc: Riley Andrews <riandrews@android.com>
> > Cc: devel@driverdev.osuosl.org
> > Cc: Android Kernel Team <kernel-team@android.com>
> > Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
> > ---
> > drivers/android/binder.c | 5 -----
> > 1 file changed, 5 deletions(-)
>
> Ping?
The "break up the binder lock" patches should have now made this
obsolete, right? If not, can you please rebase it on my
char-misc-testing tree and resend?
thanks,
greg k-h
prev parent reply other threads:[~2017-07-17 12:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-24 14:51 [PATCH] binder: Drop needless locking in binder_mmap() Dmitry Safonov
2017-06-19 14:53 ` Dmitry Safonov
2017-07-17 12:52 ` Greg Kroah-Hartman [this message]
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=20170717125219.GA20205@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=0x7f454c46@gmail.com \
--cc=arve@android.com \
--cc=devel@driverdev.osuosl.org \
--cc=dsafonov@virtuozzo.com \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=riandrews@android.com \
--cc=viro@zeniv.linux.org.uk \
/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