Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 87c091ea authored by Christian Brauner's avatar Christian Brauner Committed by Hridya Valsaraju
Browse files

UPSTREAM: binderfs: rework binderfs_binder_device_create()



- switch from d_alloc_name() + d_lookup() to lookup_one_len():
  Instead of using d_alloc_name() and then doing a d_lookup() with the
  allocated dentry to find whether a device with the name we're trying to
  create already exists switch to using lookup_one_len().  The latter will
  either return the existing dentry or a new one.

- switch from kmalloc() + strscpy() to kmemdup():
  Use a more idiomatic way to copy the name for the new dentry that
  userspace gave us.

Suggested-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarChristian Brauner <christian@brauner.io>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 136497735
(cherry picked from commit 01b3f1fc568352a1ffdcd3ee82a0297f16cc9bd9)
Change-Id: I993a7dfa2f48bc6deb305852ff4085dc8dcaae4d
Signed-off-by: default avatarHridya Valsaraju <hridya@google.com>
parent 34ffb8ef
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment