Skip to content

Commit 42c66d1

Browse files
Leo Yankuba-moo
authored andcommitted
connector/cn_proc: Use task_is_in_init_pid_ns()
This patch replaces open code with task_is_in_init_pid_ns() to check if a task is in root PID namespace. Signed-off-by: Leo Yan <[email protected]> Acked-by: Balbir Singh <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent d7e4f85 commit 42c66d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/connector/cn_proc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ static void cn_proc_mcast_ctl(struct cn_msg *msg,
358358
* other namespaces.
359359
*/
360360
if ((current_user_ns() != &init_user_ns) ||
361-
(task_active_pid_ns(current) != &init_pid_ns))
361+
!task_is_in_init_pid_ns(current))
362362
return;
363363

364364
/* Can only change if privileged. */

0 commit comments

Comments
 (0)