From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E09EC433E2 for ; Fri, 4 Sep 2020 23:35:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CEC0A2098B for ; Fri, 4 Sep 2020 23:35:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="ELwvi10S" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CEC0A2098B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 71B4B6B0071; Fri, 4 Sep 2020 19:35:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6CD496B0072; Fri, 4 Sep 2020 19:35:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5BA616B0073; Fri, 4 Sep 2020 19:35:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0042.hostedemail.com [216.40.44.42]) by kanga.kvack.org (Postfix) with ESMTP id 458976B0071 for ; Fri, 4 Sep 2020 19:35:51 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 08174282D for ; Fri, 4 Sep 2020 23:35:51 +0000 (UTC) X-FDA: 77226988902.20.bed10_04042f3270b6 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id CBF29180C07A3 for ; Fri, 4 Sep 2020 23:35:50 +0000 (UTC) X-HE-Tag: bed10_04042f3270b6 X-Filterd-Recvd-Size: 3330 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Fri, 4 Sep 2020 23:35:50 +0000 (UTC) Received: from localhost.localdomain (c-71-198-47-131.hsd1.ca.comcast.net [71.198.47.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6B4E0208FE; Fri, 4 Sep 2020 23:35:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599262549; bh=Mnr9anBUyRw4Nw5T3QhBFrDHFr9FXHh+qIzIvxlgVNo=; h=Date:From:To:Subject:In-Reply-To:From; b=ELwvi10StNI7NthwxdgjAQui7x2z+Dj+0IgjdEjhitKIG7r974/4u2H4YevedeSoO eEobwQ9Ho5hLKPGfkPDCBDR4it/EyKw/XvdobGtvUygZjgSscq5v2Us5GB+v0OLSKB TdSlPvr4OTeTuIEfg0ujOSw9wHO/JsYwALoCEOzw= Date: Fri, 04 Sep 2020 16:35:49 -0700 From: Andrew Morton To: akpm@linux-foundation.org, hch@lst.de, linux-mm@kvack.org, mm-commits@vger.kernel.org, tklauser@distanz.ch, torvalds@linux-foundation.org, viro@zeniv.linux.org.uk Subject: [patch 09/19] fork: adjust sysctl_max_threads definition to match prototype Message-ID: <20200904233549.BMYcHF_T9%akpm@linux-foundation.org> In-Reply-To: <20200904163454.4db0e6ce0c4584d2653678a3@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Rspamd-Queue-Id: CBF29180C07A3 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Tobias Klauser 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 Cc: Christoph Hellwig Cc: Al Viro Signed-off-by: Andrew Morton --- 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; _