]> www.infradead.org Git - users/dwmw2/linux.git/commit
binder: fix log spam for existing debugfs file creation.
authorMartin Fuzzey <martin.fuzzey@flowbird.group>
Fri, 10 Jan 2020 15:44:01 +0000 (16:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 1 Feb 2020 09:32:54 +0000 (09:32 +0000)
commit238701c58c10b352d1d05e3d962037190d455374
treee39ea4be43ab2ce53feaaaf12301a0b58b421045
parent962fe1c3a5d8fc0979f04997b173ae056934d96b
binder: fix log spam for existing debugfs file creation.

commit eb143f8756e77c8fcfc4d574922ae9efd3a43ca9 upstream.

Since commit 43e23b6c0b01 ("debugfs: log errors when something goes wrong")
debugfs logs attempts to create existing files.

However binder attempts to create multiple debugfs files with
the same name when a single PID has multiple contexts, this leads
to log spamming during an Android boot (17 such messages during
boot on my system).

Fix this by checking if we already know the PID and only create
the debugfs entry for the first context per PID.

Do the same thing for binderfs for symmetry.

Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group>
Acked-by: Todd Kjos <tkjos@google.com>
Fixes: 43e23b6c0b01 ("debugfs: log errors when something goes wrong")
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/1578671054-5982-1-git-send-email-martin.fuzzey@flowbird.group
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/android/binder.c