cgroup: fix error handling regressions in proc_cgroup_show() and cgroup_release_agent()
authorTejun Heo <tj@kernel.org>
Thu, 29 Sep 2016 13:49:40 +0000 (15:49 +0200)
committerTejun Heo <tj@kernel.org>
Thu, 29 Sep 2016 13:55:16 +0000 (15:55 +0200)
commite0223003e6e141533446d01a92784592a97a8552
tree3d7ce11cc68859ebd05c0d8196419734eda26b21
parent679a5e3f12830392d14f94b04bbe0f3cabdbd773
cgroup: fix error handling regressions in proc_cgroup_show() and cgroup_release_agent()

4c737b41de7f ("cgroup: make cgroup_path() and friends behave in the
style of strlcpy()") broke error handling in proc_cgroup_show() and
cgroup_release_agent() by not handling negative return values from
cgroup_path_ns_locked().  Fix it.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup.c