File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -143,12 +143,6 @@ void escape_to_root(void)
143143 return ;
144144 }
145145
146- if (cred -> euid .val == 0 ) {
147- pr_warn ("Already root, don't escape!\n" );
148- abort_creds (cred );
149- return ;
150- }
151-
152146 struct root_profile * profile = ksu_get_root_profile (cred -> uid .val );
153147
154148 cred -> uid .val = profile -> uid ;
Original file line number Diff line number Diff line change @@ -657,6 +657,9 @@ static void track_throne_function()
657657static int throne_tracker_thread (void * data )
658658{
659659 pr_info ("%s: pid: %d started\n" , __func__ , current -> pid );
660+ // for the kthread, we need to escape to root
661+ // since it does not inherit the caller's context.
662+ escape_to_root ();
660663 track_throne_function ();
661664 throne_thread = NULL ;
662665 smp_mb ();
You can’t perform that action at this time.
0 commit comments