Loading kernel/rcu/rcutorture.c +8 −5 Original line number Original line Diff line number Diff line Loading @@ -1686,7 +1686,7 @@ struct rcu_fwd { unsigned long rcu_launder_gp_seq_start; unsigned long rcu_launder_gp_seq_start; }; }; struct rcu_fwd rcu_fwds; struct rcu_fwd *rcu_fwds; bool rcu_fwd_emergency_stop; bool rcu_fwd_emergency_stop; static void rcu_torture_fwd_cb_hist(struct rcu_fwd *rfp) static void rcu_torture_fwd_cb_hist(struct rcu_fwd *rfp) Loading Loading @@ -1952,7 +1952,7 @@ static void rcu_torture_fwd_prog_cr(struct rcu_fwd *rfp) static int rcutorture_oom_notify(struct notifier_block *self, static int rcutorture_oom_notify(struct notifier_block *self, unsigned long notused, void *nfreed) unsigned long notused, void *nfreed) { { struct rcu_fwd *rfp = &rcu_fwds; struct rcu_fwd *rfp = rcu_fwds; WARN(1, "%s invoked upon OOM during forward-progress testing.\n", WARN(1, "%s invoked upon OOM during forward-progress testing.\n", __func__); __func__); Loading Loading @@ -2010,7 +2010,7 @@ static int rcu_torture_fwd_prog(void *args) /* If forward-progress checking is requested and feasible, spawn the thread. */ /* If forward-progress checking is requested and feasible, spawn the thread. */ static int __init rcu_torture_fwd_prog_init(void) static int __init rcu_torture_fwd_prog_init(void) { { struct rcu_fwd *rfp = &rcu_fwds; struct rcu_fwd *rfp; if (!fwd_progress) if (!fwd_progress) return 0; /* Not requested, so don't do it. */ return 0; /* Not requested, so don't do it. */ Loading @@ -2026,12 +2026,15 @@ static int __init rcu_torture_fwd_prog_init(void) WARN_ON(1); /* Make sure rcutorture notices conflict. */ WARN_ON(1); /* Make sure rcutorture notices conflict. */ return 0; return 0; } } spin_lock_init(&rfp->rcu_fwd_lock); rfp->rcu_fwd_cb_tail = &rfp->rcu_fwd_cb_head; if (fwd_progress_holdoff <= 0) if (fwd_progress_holdoff <= 0) fwd_progress_holdoff = 1; fwd_progress_holdoff = 1; if (fwd_progress_div <= 0) if (fwd_progress_div <= 0) fwd_progress_div = 4; fwd_progress_div = 4; rfp = kzalloc(sizeof(*rfp), GFP_KERNEL); if (!rfp) return -ENOMEM; spin_lock_init(&rfp->rcu_fwd_lock); rfp->rcu_fwd_cb_tail = &rfp->rcu_fwd_cb_head; return torture_create_kthread(rcu_torture_fwd_prog, rfp, fwd_prog_task); return torture_create_kthread(rcu_torture_fwd_prog, rfp, fwd_prog_task); } } Loading Loading
kernel/rcu/rcutorture.c +8 −5 Original line number Original line Diff line number Diff line Loading @@ -1686,7 +1686,7 @@ struct rcu_fwd { unsigned long rcu_launder_gp_seq_start; unsigned long rcu_launder_gp_seq_start; }; }; struct rcu_fwd rcu_fwds; struct rcu_fwd *rcu_fwds; bool rcu_fwd_emergency_stop; bool rcu_fwd_emergency_stop; static void rcu_torture_fwd_cb_hist(struct rcu_fwd *rfp) static void rcu_torture_fwd_cb_hist(struct rcu_fwd *rfp) Loading Loading @@ -1952,7 +1952,7 @@ static void rcu_torture_fwd_prog_cr(struct rcu_fwd *rfp) static int rcutorture_oom_notify(struct notifier_block *self, static int rcutorture_oom_notify(struct notifier_block *self, unsigned long notused, void *nfreed) unsigned long notused, void *nfreed) { { struct rcu_fwd *rfp = &rcu_fwds; struct rcu_fwd *rfp = rcu_fwds; WARN(1, "%s invoked upon OOM during forward-progress testing.\n", WARN(1, "%s invoked upon OOM during forward-progress testing.\n", __func__); __func__); Loading Loading @@ -2010,7 +2010,7 @@ static int rcu_torture_fwd_prog(void *args) /* If forward-progress checking is requested and feasible, spawn the thread. */ /* If forward-progress checking is requested and feasible, spawn the thread. */ static int __init rcu_torture_fwd_prog_init(void) static int __init rcu_torture_fwd_prog_init(void) { { struct rcu_fwd *rfp = &rcu_fwds; struct rcu_fwd *rfp; if (!fwd_progress) if (!fwd_progress) return 0; /* Not requested, so don't do it. */ return 0; /* Not requested, so don't do it. */ Loading @@ -2026,12 +2026,15 @@ static int __init rcu_torture_fwd_prog_init(void) WARN_ON(1); /* Make sure rcutorture notices conflict. */ WARN_ON(1); /* Make sure rcutorture notices conflict. */ return 0; return 0; } } spin_lock_init(&rfp->rcu_fwd_lock); rfp->rcu_fwd_cb_tail = &rfp->rcu_fwd_cb_head; if (fwd_progress_holdoff <= 0) if (fwd_progress_holdoff <= 0) fwd_progress_holdoff = 1; fwd_progress_holdoff = 1; if (fwd_progress_div <= 0) if (fwd_progress_div <= 0) fwd_progress_div = 4; fwd_progress_div = 4; rfp = kzalloc(sizeof(*rfp), GFP_KERNEL); if (!rfp) return -ENOMEM; spin_lock_init(&rfp->rcu_fwd_lock); rfp->rcu_fwd_cb_tail = &rfp->rcu_fwd_cb_head; return torture_create_kthread(rcu_torture_fwd_prog, rfp, fwd_prog_task); return torture_create_kthread(rcu_torture_fwd_prog, rfp, fwd_prog_task); } } Loading