From patchwork Fri Sep 4 23:35:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 11758677 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B4D0E166C 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 78E3C2087C for ; Fri, 4 Sep 2020 23:35:52 +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 78E3C2087C 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) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 6CD496B0072; Fri, 4 Sep 2020 19:35:51 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org 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-Original-To: linux-mm@kvack.org 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-Spam-Summary: 1,0,0,d32b9a1e4fe81014,d41d8cd98f00b204,akpm@linux-foundation.org,,RULES_HIT:41:334:355:368:369:379:800:960:967:973:988:989:1260:1345:1359:1381:1431:1437:1534:1541:1711:1730:1747:1777:1792:2393:2525:2559:2563:2682:2685:2859:2902:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3352:3865:3866:3867:3870:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:4605:5007:6261:6653:7576:9025:9545:10004:11026:11657:11658:11914:12043:12048:12296:12297:12517:12519:12555:12679:12986:13069:13311:13357:13846:13870:14181:14384:14721:21080:21212:21451:21627:21796:21939:30003:30036:30051:30054:30089,0,RBL:198.145.29.99:@linux-foundation.org:.lbl8.mailshell.net-64.100.201.201 62.2.0.100;04ygu5bc8fyzysnd9es9xosijfkffyp1ewqadk39a8hd84yucwe67fizrwyuk7x.kokw58w3wccbr1pgts7pihzni3m8eguk33cmy7e5zoxrmku11jzuq53e6m3fosa.e-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom _rules:0 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;