All of lore.kernel.org
 help / color / mirror / Atom feed
* + fork-adjust-sysctl_max_threads-definition-to-match-prototype.patch added to -mm tree
@ 2020-08-26  0:28 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2020-08-26  0:28 UTC (permalink / raw)
  To: hch, mm-commits, tklauser, viro


The patch titled
     Subject: fork: adjust sysctl_max_threads definition to match prototype
has been added to the -mm tree.  Its filename is
     fork-adjust-sysctl_max_threads-definition-to-match-prototype.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/fork-adjust-sysctl_max_threads-definition-to-match-prototype.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/fork-adjust-sysctl_max_threads-definition-to-match-prototype.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Tobias Klauser <tklauser@distanz.ch>
Subject: fork: adjust sysctl_max_threads definition to match prototype

Commit 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler")
changed ctl_table.proc_handler to take a kernel pointer.  Adjust the
definition of sysctl_max_threads to match its prototype in linux/sysctl.h
which fixes the following sparse error/warning:

kernel/fork.c:3050:47: warning: incorrect type in argument 3 (different address spaces)
kernel/fork.c:3050:47:    expected void *
kernel/fork.c:3050:47:    got void [noderef] __user *buffer
kernel/fork.c:3036:5: error: symbol 'sysctl_max_threads' redeclared with different type (incompatible argument 3 (different address spaces)):
kernel/fork.c:3036:5:    int extern [addressable] [signed] [toplevel] sysctl_max_threads( ... )
kernel/fork.c: note: in included file (through include/linux/key.h, include/linux/cred.h, include/linux/sched/signal.h, include/linux/sched/cputime.h):
./include/linux/sysctl.h:242:5: note: previously declared as:
./include/linux/sysctl.h:242:5:    int extern [addressable] [signed] [toplevel] sysctl_max_threads( ... )

Link: https://lkml.kernel.org/r/20200825093647.24263-1-tklauser@distanz.ch
Fixes: 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler")
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 kernel/fork.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/kernel/fork.c~fork-adjust-sysctl_max_threads-definition-to-match-prototype
+++ a/kernel/fork.c
@@ -3014,7 +3014,7 @@ int unshare_files(struct files_struct **
 }
 
 int sysctl_max_threads(struct ctl_table *table, int write,
-		       void __user *buffer, size_t *lenp, loff_t *ppos)
+		       void *buffer, size_t *lenp, loff_t *ppos)
 {
 	struct ctl_table t;
 	int ret;
_

Patches currently in -mm which might be from tklauser@distanz.ch are

ipc-adjust-proc_ipc_sem_dointvec-definition-to-match-prototype.patch
fork-adjust-sysctl_max_threads-definition-to-match-prototype.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-26  0:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-26  0:28 + fork-adjust-sysctl_max_threads-definition-to-match-prototype.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.