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

Commit 85e0b0cb authored by Arve Hjønnevåg's avatar Arve Hjønnevåg Committed by Greg Kroah-Hartman
Browse files

Staging: binder: Don't create two proc entries with the same name if the...


Staging: binder: Don't create two proc entries with the same name if the driver is opened twice in one process.

Signed-off-by: default avatarArve Hjønnevåg <arve@android.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1d8cbcf5
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -2776,6 +2776,7 @@ static int binder_open(struct inode *nodp, struct file *filp)
	if (binder_proc_dir_entry_proc) {
	if (binder_proc_dir_entry_proc) {
		char strbuf[11];
		char strbuf[11];
		snprintf(strbuf, sizeof(strbuf), "%u", proc->pid);
		snprintf(strbuf, sizeof(strbuf), "%u", proc->pid);
		remove_proc_entry(strbuf, binder_proc_dir_entry_proc);
		create_proc_read_entry(strbuf, S_IRUGO, binder_proc_dir_entry_proc, binder_read_proc_proc, proc);
		create_proc_read_entry(strbuf, S_IRUGO, binder_proc_dir_entry_proc, binder_read_proc_proc, proc);
	}
	}