From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1C72244AB91; Tue, 21 Jul 2026 21:42:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784670130; cv=none; b=dwrp9K6ULXL9HmaaJVAFBt4qhVPdnSuNXokTaZAxsfyN4nPQi/yNxgLa33dsg+kg9iv5mSuhT1jgQlWvDCVEult5nG2IJw3LOiTe2UgBdTPzX31dG9m3ymjLbZHxDM8FwNFi5B79Hj99UDb4ttcjFIzH+g8N6IeQkII/AujuaG8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784670130; c=relaxed/simple; bh=uQXesRgQyU7ZF4ifBAgZ4sIfGcqN2Jw6gRHsd5hMhiE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OWpgaWgmSn2s3iDzhw75Ih0oxed9iXhVnWgx2wbHmPq5RYlqiTtN6Mv3kXdu+NqOlciDXVqQA+JVDoiRR3u5/SsgqedcGGot3WWhKHLBnLMkBhA/RQJdY43OwU/nDTItjb+U6fKIv3yDwWJ3vmuDHjlhsMnZnNsWNeCgcWTS3VU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sW68UyFi; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="sW68UyFi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7CE8D1F00A3A; Tue, 21 Jul 2026 21:42:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784670129; bh=7wM8VHF+fFmIb/qccQjk5LJy4WrrSWX3jzSg8p7DkzU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=sW68UyFiOOcf7xNRjJtnE+lz39NICtz1WYdGw4YbUqBJbgYKFvfRcoTt9I/uc0Xsk vtfKKf+fULrzD6y1FQJg21bl3tysccujfWUSK4qVmdpdTqevkyngOK5YKtAUrUzcjW qRnSXLuBTAxziHBPhDJvWnqRmPEV+LmCZbqEImzM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Florian Fuchs , Miquel Raynal Subject: [PATCH 6.1 0816/1067] mtd: maps: vmu-flash: fix NULL pointer dereference in initialization Date: Tue, 21 Jul 2026 17:23:37 +0200 Message-ID: <20260721152442.807616834@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152424.521567757@linuxfoundation.org> References: <20260721152424.521567757@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Florian Fuchs commit 357e3b8e3a8769ba36eb8ec5e053e4825f1a9329 upstream. The mtd_info contains a struct device, which must be linked to its parent. Without this, the initialization of the MTD fails with a NULL pointer dereference. Fixes: 47a72688fae7 ("mtd: flash mapping support for Dreamcast VMU.") Cc: stable@vger.kernel.org Signed-off-by: Florian Fuchs Signed-off-by: Miquel Raynal Signed-off-by: Greg Kroah-Hartman --- drivers/mtd/maps/vmu-flash.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/mtd/maps/vmu-flash.c +++ b/drivers/mtd/maps/vmu-flash.c @@ -547,6 +547,7 @@ static void vmu_queryblocks(struct maple mpart->partition = card->partition; mtd_cur->priv = mpart; mtd_cur->owner = THIS_MODULE; + mtd_cur->dev.parent = &mdev->dev; pcache = kzalloc(sizeof(struct vmu_cache), GFP_KERNEL); if (!pcache)