From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26A84606A322 for ; Fri, 4 Dec 2026 21:37:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=TZ0nlrYE; dkim=fail reason="signature verification failed" (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=1q74iyQe DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=yUnN19jGjXRdouKLXxh4wE8EZjPs51sU6EG7Y9jKWCs=; b=TZ0nlrYEtT7YzFQdH1mhKo/oDz vrnz4BRkWFB3siWdte8a9PUG5IGo7T41jzqnY6jtG/fxIxqyCxPuIx+ELdCT5AhXdcGXLcGDsw8aW iUtQdVFwZDXo+q3lE3ntybrOI7dSQUDRvOqIiGQj//gAX7DGRWo5RdrtbPEIQHHE3jz0yP8dn6/vi Ru7qXYN7CUDAcLJFPpqYQUfgQIqq40RBHWUrhCUj60WI2+tH+QqevC/nZVgC1yOZ5ZBWM/sYKowO2 STyrPdqvR6H7uiCckJK7KxMTKuNKGwOecFbYUxlZygswS8pmdGhGWT7BMEvGVBV8aMSI788+qxZz/ Ciax6WVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZay8-00000001ZFj-1ewa; Fri, 04 Dec 2026 21:37:28 +0000 Received: from smtpout-02.galae.net ([185.246.84.56]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZaxn-00000001ZCr-0qqH for linux-mtd@lists.infradead.org; Fri, 04 Dec 2026 21:37:23 +0000 Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 78D3F1A1938; Fri, 4 Dec 2026 21:37:05 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 37ED0603C4; Fri, 4 Dec 2026 21:37:05 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 1029511EA0CC9; Fri, 04 Dec 2026 22:36:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1796420220; h=from:subject:date:message-id:to:cc:mime-version:content-type: in-reply-to:references; bh=mBrbMXPQfERVhMQpOgCSFe+HerOPAkePUm+4M4BNie4=; b=1q74iyQemFK60fF2maM+BTXCTmB2lvDpqv+QOYdqd7im73+UUUVGPnSudtPDHB946slnZz vcidKCeXqe+hEWYBeE9fmgEIlSLpGmK2udxqAivsSWhSg0LLEMyiD1aB5PdNiPw3Xofik3 Yl2uSXTWY6ettERvbN0cTTKmhvYHZhbZzsOglf8Boeo6I/OH5wCjTvZORm2NoJZ/b+pbwb TG332V52t1novAi9PQarE4N/1oHjH5VNca6IdgBYqcbZRjIhWfR1OIPqycHn3rbCK8tdfR WJi5Cn6qHtPGbtDFbsQlPdhLph9JYr/YKSYRtYwWPCOWwduIMnqZI5cYylyaaA== From: Miquel Raynal To: James Hilliard Cc: Richard Weinberger , Vignesh Raghavendra , Jens Axboe , Jan Kara , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Edward Adam Davis Subject: Re: [PATCH v2] mtd: leave the device type unset when naming fails In-Reply-To: <20261108-submit-mtd-devname-retry-v1-v2-1-09f576bcc51f@gmail.com> (James Hilliard's message of "Sun, 08 Nov 2026 15:48:48 -0700") References: <20261108-submit-mtd-devname-retry-v1-v2-1-09f576bcc51f@gmail.com> User-Agent: mu4e 1.12.12; emacs 30.2 Date: Fri, 04 Dec 2026 22:36:55 +0100 Message-ID: <874ics683s.fsf@bootlin.com> X-Archived-By: MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261204_133714_579522_7E176B8E X-CRM114-Status: UNSURE ( 9.06 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.1 (--) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" X-Spam-Status: No, score=-9.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On 08/11/2026 at 15:48:48 -07, James Hilliard wrote: > add_mtd_device() uses dev.type to reject a second registration of the > same MTD. It sets that field before dev_set_name(), but the failure path > for the name allocation leaves it set even though no device was > registered. Retrying registration then warns and fails with -EEXIST. > > Set the type only after naming succeeds. The later registration error > paths already clear it before releasing the device. > > Fixes: 6697dae1e2da ("mtd: capture device name setting failure when adding mtd") > Cc: stable@vger.kernel.org > Signed-off-by: James Hilliard No longer applies, please rebase. ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/