Skip to contentSkip to conversation

proc: array: drop stale FIXME about RCU in task_sig()

PATCH Applied Jaime Saguillo Revilla 2 participants 3 messages Feb 15 – Feb 16

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 proc: array: drop stale FIXME about RCU in task_sig()

task_sig() already wraps the SigQ rlimit read in an explicit RCU read-side critical section. Drop the stale FIXME comment and keep using task_ucounts() for the ucounts access.

No functional change.

---
 fs/proc/array.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/proc/array.c +1 -1
index f447e734612a..90fb0c6b5f99 100644
@@ -280,7 +280,7 @@ static inline void task_sig(struct seq_file *m, struct task_struct *p)
 		blocked = p->blocked;
 		collect_sigign_sigcatch(p, &ignored, &caught);
 		num_threads = get_nr_threads(p);
-		rcu_read_lock();  /* FIXME: is this correct? */
+		rcu_read_lock();
 		qsize = get_rlimit_value(task_ucounts(p), UCOUNT_RLIMIT_SIGPENDING);
 		rcu_read_unlock();
 		qlim = task_rlimit(p, RLIMIT_SIGPENDING);
Signature · 1 line
2.34.1
Acked-by on v1 1/1
#1 lore raw
Quoted 16 lines · Jaime Saguillo Revilla

task_sig() already wraps the SigQ rlimit read in an explicit RCU read-side critical section. Drop the stale FIXME comment and keep using task_ucounts() for the ucounts access.

No functional change.

---
 fs/proc/array.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/proc/array.c +0 -0
index f447e734612a..90fb0c6b5f99 100644

fs/proc/array.c static inline void task_sig(struct seq_file *m, struct task_struct *p) · line 284

Quoted 6 lines
fs/proc/array.c +1 -1
@@ -280,7 +280,7 @@ static inline void task_sig(struct seq_file *m, struct task_struct *p)
 		blocked = p->blocked;
 		collect_sigign_sigcatch(p, &ignored, &caught);
 		num_threads = get_nr_threads(p);
-		rcu_read_lock();  /* FIXME: is this correct? */
+		rcu_read_lock();
 		qsize = get_rlimit_value(task_ucounts(p), UCOUNT_RLIMIT_SIGPENDING);

I think that task_ucounts/rcu interaction need cleanups, I'll try to do this next week(s)...

But as for this change I agree: the code is correct and "FIXME' adds the unnecessary confusion.

author
#2 lore raw

Thanks, Oleg, for the review and Ack.

I’ll watch for the task_ucounts/RCU cleanup.

Thanks,
Jaime

Quoted 33 lines · Oleg Nesterov
Quoted 16 lines · Jaime Saguillo Revilla

task_sig() already wraps the SigQ rlimit read in an explicit RCU read-side critical section. Drop the stale FIXME comment and keep using task_ucounts() for the ucounts access.

No functional change.

---
 fs/proc/array.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/proc/array.c +0 -0
index f447e734612a..90fb0c6b5f99 100644

fs/proc/array.c static inline void task_sig(struct seq_file *m, struct task_struct *p) · line 284

Quoted 6 lines
fs/proc/array.c +1 -1
@@ -280,7 +280,7 @@ static inline void task_sig(struct seq_file *m, struct task_struct *p)
              blocked = p->blocked;
              collect_sigign_sigcatch(p, &ignored, &caught);
              num_threads = get_nr_threads(p);
-             rcu_read_lock();  /* FIXME: is this correct? */
+             rcu_read_lock();
              qsize = get_rlimit_value(task_ucounts(p), UCOUNT_RLIMIT_SIGPENDING);

I think that task_ucounts/rcu interaction need cleanups, I'll try to do this next week(s)...

But as for this change I agree: the code is correct and "FIXME' adds the unnecessary confusion.