Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp613752rdg; Tue, 10 Oct 2023 23:33:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGmL+FwB9W3ZqrhxRniXUCBo/a7qqoOmkpFcIYZy9pDar9+4Untfwl7KmbCC2bV7DvwxRrj X-Received: by 2002:a17:902:d48e:b0:1c6:11ca:8861 with SMTP id c14-20020a170902d48e00b001c611ca8861mr25105180plg.21.1697005996905; Tue, 10 Oct 2023 23:33:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697005996; cv=none; d=google.com; s=arc-20160816; b=Tos79qKu/1BUGtzEe2iIbxdD3iRolrwfb4AyB+V3tTfBtSC5f0xcb6oI+s6CQUTcxJ vv7puu31fKb+yNrqtIk/bllZFtpVc/KoaJtR6c1PCJhyzMR6b7M9ogo99JL/a0XJQCI4 /nXKxe7k32iOXamvnwc2v2cR0g27Xg0amLePccECgkWq0hft20j7zOuoCbSEClq8IxAC L/y53t9r0wKOjqEXamZYdZKrEdYEdjxSHj6bEU+5AFI9fLk1h4/ZKERoxc5ptutkmD33 lGKo1oi+OboHvXedtP4kz3tn3r6DCGOqwUAAiBjh0MQFnpjUTG78HYTiWOThoEr0nd3k We4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=JuGLbU0pFmaf0hdqUPQ41cR0VcwZqle229ZKMOGytXo=; fh=cPLdOnU7xZYcMyynLv70DfTHTWv5upyvQ0c3UUSQ9ak=; b=AnrNLLL0VRszJTLyfYpkw0y0DXQDnud2RmmPr1eusGF5OTe2Rdi36QNXsQn0Or3W6F 71X35R4jVfr9b1OBHWuw0ESLjH1KSRB/EIPeZsYGnfPGhf7GAv82ppdc1hgqXMrgcVa0 IHKG2aYVkRwWlByRMMONoCM544NRX87u2zgzKBx2iqUe6JgGFe1Aq43bDb9JiHigxxS+ 9syI6YKCzmFctmuK+1+RniJEEXYsdqYPntfUo29HbsX1QSdUDgEUxXh5KT8OIS/hrFic Ce+JsL7MXGVK7fsCUtlGoCdINRR6zeIpY5vfoLLON+3M1G9AQMI1h+hZGFG/1G27K/ke AFqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FJ1y0hVj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id p8-20020a170902e74800b001c9b1c1006asi3798480plf.212.2023.10.10.23.33.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 23:33:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FJ1y0hVj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id D1E8C83294E3; Tue, 10 Oct 2023 23:33:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345305AbjJKGcs (ORCPT + 99 others); Wed, 11 Oct 2023 02:32:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345233AbjJKGcp (ORCPT ); Wed, 11 Oct 2023 02:32:45 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9259B9B for ; Tue, 10 Oct 2023 23:32:44 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1AD1C433C7; Wed, 11 Oct 2023 06:32:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1697005964; bh=Lb/42Qm3utcBiONCdOP5wqcXR9jQ63Q9gVfbicfEypU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FJ1y0hVjDY3aMOnoiWuOcOcILh7Na/FhtOBCP4aV1dJ2WYF5CGXwRrUS9WKTH2zd8 GfEInF+nvGrhVHoQVEP717m9aqO7DiugAnRHe0W18hMcInCXUvsmegElpfsxQwGeFN DgBUhXBcBWtWBc/FAdoR91bE5vQQ0N+02jkGrbFA= Date: Wed, 11 Oct 2023 08:32:40 +0200 From: Greg Kroah-Hartman To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: Arnd Bergmann , linux-kernel@vger.kernel.org Subject: Re: [PATCH] misc/pvpanic: deduplicate comomn code Message-ID: <2023101113-squatter-stew-5d66@gregkh> References: <20231011-pvpanic-cleanup-v1-1-5c93b05ec331@weissschuh.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231011-pvpanic-cleanup-v1-1-5c93b05ec331@weissschuh.net> X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 10 Oct 2023 23:33:13 -0700 (PDT) X-Spam-Level: ** On Wed, Oct 11, 2023 at 12:10:08AM +0200, Thomas Wei?schuh wrote: > +int devm_pvpanic_probe(struct device *dev, void __iomem *base) > +{ > + struct pvpanic_instance *pi; > + int ret; > + > + if (!base) > + return -EINVAL; > + > + ret = devm_device_add_groups(dev, pvpanic_dev_groups); You just raced with userspace and lost :( Please just use the default groups attribute pointer, you should NEVER need to manually add groups to a device like this. And why are you calling this devm_*() for a probe function? That's risky as you are now in the global namespace and this really is not a devm_*() like function thanks, greg k-h