Re: [PATCH 2/5] kernfs: implement kernfs_walk_and_get()

From
David Miller <davem@davemloft.net>
Date
2015-11-17 21:20:52
Also in
cgroups, lkml, netfilter-devel
Reply to
Tejun Heo, 2015-11-17
From: Tejun Heo <tj@kernel.org>
Date: Tue, 17 Nov 2015 14:40:37 -0500
+	static char path_buf[PATH_MAX];	/* protected by kernfs_mutex */
+	int len = strlen(path);
 ...
quoted hunk ↗ jump to hunk
+	if (len >= PATH_MAX)
+		return NULL;
+
+	memcpy(path_buf, path, len + 1);
	static char path_buf[PATH_MAX];	/* protected by kernfs_mutex */
	int len = strlcpy(path_buf, path, PATH_MAX);
 ...
	if (len >= PATH_MAX)
		return NULL;
Thread (22 messages) 22 messages, 4 authors, last reply 2015-11-17
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help