ANDROID: xt_IDLETIMER: reorder idletimer_tg_destroy()
The sysfs_remove_file() call in idletimer_tg_destroy() was incorrectly placed before cancel_work_sync() during a merge conflict resolution in commit92cf99250d("Merge tag 'v6.2-rc1' into android-mainline"). Let's switch to the original order as introduced by commit68983a354a("netfilter: xtables: Add snapshot of hardidletimer target"). This aligns the order of the calls with upstream. Also move unregister_pm_notifier() calls before timer_shutdown_sync(). This aligns the order of the calls with older ACK branches. As having these differences across branches is creating confusion with partners. Bug: 497588852 Bug: 531493108 Fixes:92cf99250d("Merge tag 'v6.2-rc1' into android-mainline") Change-Id: Ia65db132c22a487b1874e9b59da8e7c9ad3ac324 Signed-off-by: Carlos Llamas <cmllamas@google.com>
This commit is contained in:
1 parent
d0fea7899c
commit
a7350f99bf
1 file changed
+4
-4
@@ -691,10 +691,10 @@ static void idletimer_tg_destroy(const struct xt_tgdtor_param *par)
|
||||
list_del(&info->timer->entry);
|
||||
mutex_unlock(&list_mutex);
|
||||
|
||||
timer_shutdown_sync(&info->timer->timer);
|
||||
sysfs_remove_file(idletimer_tg_kobj, &info->timer->attr.attr);
|
||||
unregister_pm_notifier(&info->timer->pm_nb);
|
||||
timer_shutdown_sync(&info->timer->timer);
|
||||
cancel_work_sync(&info->timer->work);
|
||||
sysfs_remove_file(idletimer_tg_kobj, &info->timer->attr.attr);
|
||||
kfree(info->timer->attr.attr.name);
|
||||
kfree(info->timer);
|
||||
}
|
||||
@@ -719,14 +719,14 @@ static void idletimer_tg_destroy_v1(const struct xt_tgdtor_param *par)
|
||||
list_del(&info->timer->entry);
|
||||
mutex_unlock(&list_mutex);
|
||||
|
||||
unregister_pm_notifier(&info->timer->pm_nb);
|
||||
if (info->timer->timer_type & XT_IDLETIMER_ALARM) {
|
||||
alarm_cancel(&info->timer->alarm);
|
||||
} else {
|
||||
timer_shutdown_sync(&info->timer->timer);
|
||||
}
|
||||
sysfs_remove_file(idletimer_tg_kobj, &info->timer->attr.attr);
|
||||
unregister_pm_notifier(&info->timer->pm_nb);
|
||||
cancel_work_sync(&info->timer->work);
|
||||
sysfs_remove_file(idletimer_tg_kobj, &info->timer->attr.attr);
|
||||
kfree(info->timer->attr.attr.name);
|
||||
kfree(info->timer);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user