Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp26213299rwd; Mon, 3 Jul 2023 06:56:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7A/XVFNCU4tMY23dYzBDXXKwMKH0pRgJeb1Hwq2i5uGD8xjir4GoEuuBU+qyssx9Uo9OL5 X-Received: by 2002:aca:1316:0:b0:3a3:7ecd:7d32 with SMTP id e22-20020aca1316000000b003a37ecd7d32mr11015398oii.30.1688392611902; Mon, 03 Jul 2023 06:56:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688392611; cv=none; d=google.com; s=arc-20160816; b=pRL9Z97Xa8T2iOS2WRRNw+5JKjX4qiF8aNVHTYBKnn7dPO+GRQrA+9coaKuvmrXRlY jNqGKUKY8QqNTVwx966Q6RqWzej8ICisTCYvZRMNSXsxmpXnBOaBGTcIogy1NKj0Arpj ejPDEapx8UdeiqmEQQvC4z/YUj6qMn9uzhYNOTSJ1r6sYewKKP/Kmmgb65STxioXOgHj PmFvWVN5s9WVxPeMIuys/c76mXRQILGPrL+9B93WyN7BHz83FNUGN2XgpXaifTFEcnpt JfwtJP1lBXC+zCxAvCPL5s8OiOykT4zZGvMxTnEqoSItWi+2k2wiXjUJyRmYn+YhfNUT bVag== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9+N0VjVRFE1zzVTBOOOhUhNg8OhdkcIpMNa/toTvU6g=; fh=pt/9wjjK3xZZU4nXUrzOfuhExSiJgLD/uoj5WCm5G+s=; b=WiVmyiowBl4hsX5pRsyQQR6g51lbrsxzrr4MOgZEbUQ+0vlJ5gfgoby7zaOaDRxG2Q iOUGJCnRk5NeRkWKF4QNuwPbjLED0HaXboZflcCm77NBMjZkhQHiDjGOW1YFPODeg/mA 3mTqN+yG1FUQzUy/1YqGektfgMoeE8bMV/URXC8hVgH9K31B5D1EAkJMqTAMVplZFXDI UeCxuIw81Bk6JYNLibCyJJ31uaeTs7Z9UnmUeI/izHiEiQ2GeGYrCIzeLFzbLx2WDHSx jW+9jeAC173BO+/mHKgXbODHV4cFTwTKmgizGqI2oL4EWqAVsVsVuMzEDZ9uaiNsUcC6 4BEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=pUhlzrK+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b21-20020a056a000cd500b0067c2b7b23e3si13717542pfv.345.2023.07.03.06.56.38; Mon, 03 Jul 2023 06:56:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=pUhlzrK+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229454AbjGCNr0 (ORCPT + 99 others); Mon, 3 Jul 2023 09:47:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229738AbjGCNrZ (ORCPT ); Mon, 3 Jul 2023 09:47:25 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFB37109; Mon, 3 Jul 2023 06:47:24 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 706231FE05; Mon, 3 Jul 2023 13:47:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1688392043; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9+N0VjVRFE1zzVTBOOOhUhNg8OhdkcIpMNa/toTvU6g=; b=pUhlzrK+n0mvTNUhJACawFkzwc0mc0Xi2brODsJVWEkNx3xMYnqZS7b2rCdSMr6OkvOG5j zkRBlHxA4AozbCnGdJDmFZD7UQArFQHyyfiwcsjtJm+pck058/7JJRwqm55iFB4edz7ejQ xL3bDDlnnD9XBd8xpwpVp40SZYYYg+M= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 2542C13276; Mon, 3 Jul 2023 13:47:23 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Bx4TB2vRomTHJgAAMHmgww (envelope-from ); Mon, 03 Jul 2023 13:47:23 +0000 Date: Mon, 3 Jul 2023 15:47:22 +0200 From: Michal Hocko To: Luis Chamberlain Cc: Jean Delvare , linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] module: print module name on refcount error Message-ID: References: <20230626123252.73dbc139@endymion.delvare> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 30-06-23 16:05:33, Luis Chamberlain wrote: [...] > What prevents code from racing the free with a random module_put() > called by some other piece of code? Wouldn't be ref count a garbage already? How can you race when freeing if module_put fail? -- Michal Hocko SUSE Labs