Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4777012pxb; Tue, 25 Jan 2022 19:19:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJxGgha9iHwAvNjAORHZi1duua0OGz8iY23YVEcDtwLG7nls5Whb9YMoVM1MtrXX8fBBH+Av X-Received: by 2002:a17:906:9c84:: with SMTP id fj4mr6337959ejc.506.1643167189306; Tue, 25 Jan 2022 19:19:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643167189; cv=none; d=google.com; s=arc-20160816; b=n7QqHtejAhwsVSg5rzZfRVayCMQiyWxyqcOSyscmAw9fU4OMGlzVWcc/w1PkSZHpwF kQvdXv+WlYauxuQ4YneBaHuG3ZXloZXrWS1o7jFqgMnHCG7jaq2XMi5Vjkl5WlTpi8+9 HRuMSw/HqDSgEJOYyVuiMnIRsq+PoM0c+Ut2cxX39KqUbfvuQ+4+UviJf7PAT1cHt5Ss IWaraOLjlSsxqUBLVuEIsmAcMvQ4I8AhBTSJAoc3NXUXLiV1m6bFgCDH+livDwhpzJgp Wn6zRpMFEPIv3p5V55lUEUzNIXKgzLtXA9TWez64PViXzKzTJEPEKIEJhAXXMQB2ERdH 7fOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=QguUO9iElD2uimtN6/KPbOt0qekHNlpVkvs8+DjH69c=; b=FR2wkq5UjVHwljZoQ/Y2ZojbEYOWnalF/XfldCl3Q58GtyJRRc4LiHp8X/H+4E3mpR BLJlRNn6FnMogXSe9DacPg8tI7bTotUPC7hScpRn++l5n5aV93n6K0OAx2ny1DVus366 qJYr7WhmGRUpXbMlUWJR1tSVTwc0L8dJAn/YGfTyE63M0z1U4DW8YS5XaBaTpiIQMAN3 Uzlu+tPRVLYNJwMnkDpKXZe5WyVXHedexZUpw9hknwLdC5HtfBxyAfr2x1g9BhY/F93q XIoe0hoKny1814VrS5mN9CWaKiVsLEtS6DVFVy2oTt1G4umG9OjCEXwEKpyMfXnalv6/ 6XOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=uaK3s2h5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ds6si1290499ejc.988.2022.01.25.19.19.25; Tue, 25 Jan 2022 19:19:49 -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=@infradead.org header.s=bombadil.20210309 header.b=uaK3s2h5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229501AbiAYSO5 (ORCPT + 99 others); Tue, 25 Jan 2022 13:14:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbiAYSO4 (ORCPT ); Tue, 25 Jan 2022 13:14:56 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B669C06173B; Tue, 25 Jan 2022 10:14:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=QguUO9iElD2uimtN6/KPbOt0qekHNlpVkvs8+DjH69c=; b=uaK3s2h5rUUptGzpogZMFDWObe 9ULZR/LqtY/+bEM2lmks7rtmA/gvNTdTE0cJFb5ebFuqX0ZMmKP5MPDeDKuX5xnzPIh6FHG8K34Ok m9SA9LjwcR2yFL0SWaXTAXlFcczAbZyc+LGLFI/bdXOsd0y2i+DhvW3izMOHxAUSTBsBoBUUeiBqe UaO48mGvCi7SJFTFxM44tKdXa4hMH/hXmsUrx9yF0DM/PZZ+NR9FBsUEGKMByeAlqKvkttrxn/+/H O6wMgYXnJvYi3IKF/R5V1YwdbnuESffdlAYaXM9Yj6kjVpHhns2rtpSsFpM1MtDwyVMTiigB8MJLq B/aWlgyQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCQL8-009Bmm-83; Tue, 25 Jan 2022 18:14:46 +0000 Date: Tue, 25 Jan 2022 10:14:46 -0800 From: Luis Chamberlain To: Andrew Morton Cc: kernel test robot , Tong Zhang , Alexander Viro , Eric Biederman , Kees Cook , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, kbuild-all@lists.01.org, Linux Memory Management List Subject: Re: [PATCH v1] binfmt_misc: fix crash when load/unload module Message-ID: References: <20220124003342.1457437-1-ztong0001@gmail.com> <202201241937.i9KSsyAj-lkp@intel.com> <20220124151611.30db4381d910c853fc0c9728@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220124151611.30db4381d910c853fc0c9728@linux-foundation.org> Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 24, 2022 at 03:16:11PM -0800, Andrew Morton wrote: > 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 Acked-by: Luis Chamberlain Luis