Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3996079pxb; Tue, 25 Jan 2022 00:59:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJwN1tnYciNa6gqxq/qIjcMVGc2lfbAIZuJipMagy8a6qeOgi3CcN7+7HsJspWXzHhuXB38K X-Received: by 2002:a17:902:8c83:b0:149:8ef6:b2ff with SMTP id t3-20020a1709028c8300b001498ef6b2ffmr17736954plo.32.1643101140970; Tue, 25 Jan 2022 00:59:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643101140; cv=none; d=google.com; s=arc-20160816; b=WdwDmgNiunzEL+xdiqm13zpzv1IpZHvI6bhb+i+7kOWTDchy2JW12+MXZE/8JJTPK2 3pY3S16QiIZB51HWA5E+enJysHRRd0DcRjNkDULVoWDxjkG57zHKrnyGmG8MfdtUBbTW zKAnPeClXoMotE8C+j86OcENNC/Ue5vcpEx0CJ33XCFO1EXd1BuNJk4g1eyiTEbXhSKw +2eZ+PxGFnEvrnSkdA5VyDvuK9jMx39A2H3qTvCsXTo+eIjvCvFBiiqeGwKss9L6dPMr qojVhgoGgipRcRXvDeg02PU44SZF14YGWVJN5HhE4P+xUPpn0/1+Nvvuqy9UFXU6wUcT Qf2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=snV+VJvWc3qnZh8lfpT7HG8qhhikEXEo03xNFQO1ZLM=; b=uapycbewJuqW0UoBLEfk9dfbFzDaQS7CUe7vmJKpn7b8w8U+SMFRx7KyFQbziCuTjo R4lgYCddUwH93FB4WJbE1k5ydXOwKxipnkZA2lDlwOvkXew5Tq8cGIVY4/TXBZi3cl4f uYVwYbZuR4Oa/LXIZWqjNsfQoRpXdg/zE2uvXEvxz5XeupUZxSmofZAY49A8tCcahKgK 2NzMMMy2A5iSPDYUv8s6dbG+blq/l+88WLqKtslAW58bJW8PisTULO3vJByXWqtadW8I uyLyhvEYRsIiiUM+BS/twDY8pVxpqFVLxpPqzE/Dr+CqOMHOqoQIswNWuly8lcS6hzpy aHng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=j8mCv6+a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b184si13400087pga.232.2022.01.25.00.58.47; Tue, 25 Jan 2022 00:59:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=j8mCv6+a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S254777AbiAYEqk (ORCPT + 99 others); Mon, 24 Jan 2022 23:46:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381842AbiAYDm0 (ORCPT ); Mon, 24 Jan 2022 22:42:26 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7934C06125D; Mon, 24 Jan 2022 15:16:14 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 462C76091A; Mon, 24 Jan 2022 23:16:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E6ADC340E4; Mon, 24 Jan 2022 23:16:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1643066173; bh=m4lQeB2jxEx5NHaHefSlx/F98dqVWm5eHt4WwZYhJpM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=j8mCv6+aS6ePm629WrGtbqhFWtZRlSIPGQWCJ2M8Hc66L3928ziPS/9Mj1nUARG17 kt/RsEE5+sQQpeWWDXMEqpNYQWgH1CY1XR1Fvtawb5UzwQvOSbhwmyTA17BetPB/4B g7Zu838H+7A9Xfx8JffSWEBeVxBnOui3OPHo4/lk= Date: Mon, 24 Jan 2022 15:16:11 -0800 From: Andrew Morton To: kernel test robot Cc: Tong Zhang , Alexander Viro , Eric Biederman , Kees Cook , Luis Chamberlain , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, kbuild-all@lists.01.org, Linux Memory Management List , Luis Chamberlain Subject: Re: [PATCH v1] binfmt_misc: fix crash when load/unload module Message-Id: <20220124151611.30db4381d910c853fc0c9728@linux-foundation.org> In-Reply-To: <202201241937.i9KSsyAj-lkp@intel.com> References: <20220124003342.1457437-1-ztong0001@gmail.com> <202201241937.i9KSsyAj-lkp@intel.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 24 Jan 2022 19:40:53 +0800 kernel test robot wrote: > Hi Tong, > > > >> fs/binfmt_misc.c:828:21: error: incompatible pointer types assigning to 'struct ctl_table_header *' from 'struct sysctl_header *' [-Werror,-Wincompatible-pointer-types] > binfmt_misc_header = register_sysctl_mount_point("fs/binfmt_misc"); > ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 1 error generated. > > > vim +828 fs/binfmt_misc.c > > 821 > 822 static int __init init_misc_binfmt(void) > 823 { > 824 int err = register_filesystem(&bm_fs_type); > 825 if (!err) > 826 insert_binfmt(&misc_format); > 827 > > 828 binfmt_misc_header = register_sysctl_mount_point("fs/binfmt_misc"); > 829 if (!binfmt_misc_header) { > 830 pr_warn("Failed to create fs/binfmt_misc sysctl mount point"); > 831 return -ENOMEM; > 832 } > 833 return 0; > 834 } > 835 This is actually a blooper in Luis's "sysctl: add helper to register a sysctl mount point". Please test, review, ridicule, etc: From: Andrew Morton Subject: include/linux/sysctl.h: fix register_sysctl_mount_point() return type The CONFIG_SYSCTL=n stub returns the wrong type. Fixes: ee9efac48a082 ("sysctl: add helper to register a sysctl mount point") Cc: Luis Chamberlain Cc: Tong Zhang Signed-off-by: Andrew Morton --- include/linux/sysctl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/linux/sysctl.h~a +++ a/include/linux/sysctl.h @@ -265,7 +265,7 @@ static inline struct ctl_table_header *r return NULL; } -static inline struct sysctl_header *register_sysctl_mount_point(const char *path) +static inline struct ctl_table_header *register_sysctl_mount_point(const char *path) { return NULL; } _