File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626
2727extern bool susfs_is_current_ksu_domain (void );
2828extern void setup_selinux (const char * domain , struct cred * cred );
29+ extern struct cred * ksu_cred ;
2930
3031#ifdef CONFIG_KSU_SUSFS_ENABLE_LOG
3132DEFINE_STATIC_KEY_TRUE (susfs_is_log_enabled );
@@ -1446,11 +1447,25 @@ void susfs_start_sdcard_monitor_fn(void) {
14461447 }
14471448}
14481449
1450+ /* Defer the potentially blocking sus-path loop work from the setuid hook. */
1451+ struct work_struct susfs_extra_works ;
1452+
1453+ static void susfs_run_extra_works (struct work_struct * work )
1454+ {
1455+ if (!ksu_cred )
1456+ return ;
1457+
1458+ #ifdef CONFIG_KSU_SUSFS_SUS_PATH
1459+ susfs_run_sus_path_loop ();
1460+ #endif
1461+ }
1462+
14491463/* susfs_init */
14501464void susfs_init (void ) {
1465+ SUSFS_LOGI ("Initializing susfs_extra_works\n" );
1466+ INIT_WORK (& susfs_extra_works , susfs_run_extra_works );
14511467 SUSFS_LOGI ("susfs is initialized! version: " SUSFS_VERSION " \n" );
14521468}
14531469
14541470/* No module exit is needed becuase it should never be a loadable kernel module */
14551471//void __init susfs_exit(void)
1456-
You can’t perform that action at this time.
0 commit comments