Loading net/netfilter/xt_IDLETIMER.c +7 −1 Original line number Diff line number Diff line Loading @@ -76,6 +76,7 @@ struct idletimer_tg { bool send_nl_msg; bool active; uid_t uid; bool suspend_time_valid; }; static LIST_HEAD(idletimer_tg_list); Loading Loading @@ -245,8 +246,13 @@ static int idletimer_resume(struct notifier_block *notifier, switch (pm_event) { case PM_SUSPEND_PREPARE: get_monotonic_boottime(&timer->last_suspend_time); timer->suspend_time_valid = true; break; case PM_POST_SUSPEND: if (!timer->suspend_time_valid) break; timer->suspend_time_valid = false; spin_lock_bh(×tamp_lock); if (!timer->active) { spin_unlock_bh(×tamp_lock); Loading Loading @@ -281,7 +287,7 @@ static int idletimer_tg_create(struct idletimer_tg_info *info) { int ret; info->timer = kmalloc(sizeof(*info->timer), GFP_KERNEL); info->timer = kzalloc(sizeof(*info->timer), GFP_KERNEL); if (!info->timer) { ret = -ENOMEM; goto out; Loading Loading
net/netfilter/xt_IDLETIMER.c +7 −1 Original line number Diff line number Diff line Loading @@ -76,6 +76,7 @@ struct idletimer_tg { bool send_nl_msg; bool active; uid_t uid; bool suspend_time_valid; }; static LIST_HEAD(idletimer_tg_list); Loading Loading @@ -245,8 +246,13 @@ static int idletimer_resume(struct notifier_block *notifier, switch (pm_event) { case PM_SUSPEND_PREPARE: get_monotonic_boottime(&timer->last_suspend_time); timer->suspend_time_valid = true; break; case PM_POST_SUSPEND: if (!timer->suspend_time_valid) break; timer->suspend_time_valid = false; spin_lock_bh(×tamp_lock); if (!timer->active) { spin_unlock_bh(×tamp_lock); Loading Loading @@ -281,7 +287,7 @@ static int idletimer_tg_create(struct idletimer_tg_info *info) { int ret; info->timer = kmalloc(sizeof(*info->timer), GFP_KERNEL); info->timer = kzalloc(sizeof(*info->timer), GFP_KERNEL); if (!info->timer) { ret = -ENOMEM; goto out; Loading