Skip to contentSkip to conversation

kernel-hung_taskc-make-type-annotations-consistent.patch removed from -mm tree

merged [email protected] 1 participant 1 message Nov 3, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: kernel/hung_task.c: make type annotations consistent
has been removed from the -mm tree. Its filename was
kernel-hung_taskc-make-type-annotations-consistent.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Lukas Bulwahn <[email protected]>
Subject: kernel/hung_task.c: make type annotations consistent

Commit 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler") removed various __user annotations from function signatures as part of its refactoring.

It also removed the __user annotation for proc_dohung_task_timeout_secs() at its declaration in ./sched/sysctl.h, but not at its definition in ./kernel/hung_task.c.

Hence, sparse complains:

  kernel/hung_task.c:271:5: error: \
  symbol 'proc_dohung_task_timeout_secs' redeclared with different type \
  (incompatible argument 3 (different address spaces))

Adjust the annotation at the definition fitting to that refactoring to make sparse happy again, which also resolves this warning from sparse:

  kernel/hung_task.c:277:52: warning: incorrect type in argument 3 \
    (different address spaces)
  kernel/hung_task.c:277:52:    expected void *
  kernel/hung_task.c:277:52:    got void [noderef] __user *buffer

No functional change. No change in object code.

---

 kernel/hung_task.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
kernel/hung_task.c renamed from kernel/hung_task.c~kernel-hung_taskc-make-type-annotations-consistent +1 -2
@@ -225,8 +225,7 @@ static long hung_timeout_jiffies(unsigne
  * Process updating of timeout sysctl
  */
 int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
-				  void __user *buffer,
-				  size_t *lenp, loff_t *ppos)
+				  void *buffer, size_t *lenp, loff_t *ppos)
 {
 	int ret;
 

_

Patches currently in -mm which might be from [email protected] are

mm-vmscan-drop-unneeded-assignment-in-kswapd.patch