Article View: linux.kernel.netdev
Article #25658Re: [PATCH] ieee802154: fakelb: release platform device if driver registration fails
From: Stefan Schmidt
Date: Wed, 02 Dec 2026 08:22
Date: Wed, 02 Dec 2026 08:22
23 lines
8062 bytes
8062 bytes
Hello Wentao Liang.
On Tue, 03 Nov 2026 10:28:54 +0000, Wentao Liang wrote:
> fakelb_init_module() registers a platform device and then registers the
> platform driver, returning the result of the latter directly. If driver
> registration fails, module initialization fails and the module exit
> function is never run, so the platform device is never unregistered and
> leaks.
>
> Check the result of platform_driver_register() and unregister the device
> on failure. Also check the device registration result, which can be an
> ERR_PTR, before using the stored pointer.
>
> [...]
Applied to wpan/wpan.git, thanks!
[1/1] ieee802154: fakelb: release platform device if driver registration fails
https://git.kernel.org/wpan/wpan/c/c113890c5450
regards,
Stefan Schmidt
Technical Details
Message-ID:
<179619974992.3931075.2260015051099513584.b4-ty@datenfreihafen.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!feed-us-ny.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375628-linux-kernel-netdev=dewy.ruReferences:
<20261103102854.1340581-1-vulab@iscas.ac.cn>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!feed-us-ny.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375628-linux-kernel-netdev=dewy.ru From: stefan@datenfreihafen.org (Stefan Schmidt) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH] ieee802154: fakelb: release platform device if driver registration fails Date: Wed, 2 Dec 2026 09:22:34 +0100 Organization: Usenet Network Message-ID: <179619974992.3931075.2260015051099513584.b4-ty@datenfreihafen.org> References: <20261103102854.1340581-1-vulab@iscas.ac.cn> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1922153"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:c7KOL/1//UToA9qqoNknOS6pwM4= sha256:dpysvrMEJFXa6wWyEEk1OfTsxubOmRFfPN1xwDkOr/g= sha1:NwXSBeanhPK2/DIulgySwsxSyDc= sha256:tPtv86yZ1MUhstp+Ou3eW13HitQqNVxbrkm2orXWmbE= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 531E11175A0; Wed, 2 Dec 2026 11:23:10 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.051 X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RaWYGLi7lMog; Wed, 2 Dec 2026 11:23:05 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-375628-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=datenfreihafen.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 76AF511757C; Wed, 2 Dec 2026 11:22:59 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 1722F2BCA3; Wed, 2 Dec 2026 08:22:52 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796199762; b=gx326ErzpcscCpyYed3TGSZiwr2jcxolu0Utu8nVgiFKfYGmbLRLLk1GAbjIhiRf/4KS xcDyEicuRtQU91pGCTjADSfvMbzr4Engl+HHddS/+vk4J5m54XSCUffAREcfZCj7ioBGU L1CzlvMr3NP4KwYTpHHQVOBeN/uI+YDIKPp/TDNB/tRV3IFaZ7cdWoDD8ATYJQActcXN4 GjBOno2QDrEfXY+TLIhq4cWhaBdUcMAE3tGaeORLQ8tjXonVvQwRKK3WFnVLKBoLwh3CB 2r6wVNq49gHXJ6P94o62I1IDlPxShg6lpTwMLJtRbe7JnyGoe2bEoxaKB1sdZa0vuBQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796199762; h=X-Original-To:Received:DMARC-Filter:Received:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=bpW5tsr2+o+/jSxBZ9GGYEblsBw5loVrcgeTkeO39KM=; b=3OyYq4OH3o6x1tnvrahr0kNl+fhUlv6LG1I6YED3G/haTb3mD6VPquMg4RP6Tes0xXwc LM7IHKZRWHBEPlDfQJHgtK+RjWNHYNv1UtfQsMSPpi33GeMg9tA5ch+W6ghGsGwvI7nGK hIIBRcy/utCgheiHJR4wgAAZED/xxJzBfscj4K4m4u1wLhf22Q8zGFd4fs9dpGMTE4hYj d1/MVT3mhfJwRDBUF8lmcb8CS/iJ01340efla4wVyNvHQZSHjc8ri3guQCO0W4hR7n9WH K2t7Ty4wkPYAyaUUFfeOXIJc64AHk7ljjXdPpYESgWmGHU/m0zSAPnvRjtnQGk4P6YA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none header.from=datenfreihafen.org; spf=pass smtp.mailfrom=datenfreihafen.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 01A12606A32F; Wed, 2 Dec 2026 08:22:42 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=78.47.171.185 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796199761; b=rWl0c2eni8zjoWxkCpUWxX2ozc5wP0BP5K3OXPdTwc/TbRG24UFZChIoUae6NedByhZ4 4QARVPqngGzBX04V2PQQsELuxbZVJsgXr7KVMV7QZ9+ddIZlwxbmPs9C+27lWC+joj4Ql gZgl7e95qrdevqkDFEqstrNjhZVfgCcyznWenakCZ2hIyV7lxlzf0nZO5dIEDLdyCAMeA zmODHWSOZq3NA2yfWosbuiAHTgVQnPcId5JmjE7Ip/OTM1UIg4uQsOvvEGOgLig5NoUsC XAr7ug4KCqlPn1BoVq/8TVhlufd1ii/YdFaiZZKmwVppvFL/czk2kONRPaT9B1v16VA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796199761; h=DMARC-Filter:Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=bpW5tsr2+o+/jSxBZ9GGYEblsBw5loVrcgeTkeO39KM=; b=bpQ6dXgb6NrEXCaRA00x6fMvjBywJ9M1YcZJZ5BhspNrH46Zfnm0OYa28CW2nhgrboRA AOPEpo+qWY98zVVJ07NagJ9DNuRn4n5fUhy5D8tiUg6dghxaj5pdM8cAmtgI1K7hYqbA/ 9sKi+svzVutFXRpeLu5g8pnx042Q4gPheSTsS31yQcerTjAwwMlCymk9hKsx/Uc7zGhm+ ppipGUJ9taoyzBc76vEG8l9uSDI2hrnG0meqoAq9476KbCWyBeyA21iI6ui0N0YvMRvNs 5WtYjcNM7UzkF5G4bnv1Wi5/NS7qto8RCuMYbn9hKq+zfhtqMybch4cPfV6bdzfsxUg== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=datenfreihafen.org; spf=pass smtp.mailfrom=datenfreihafen.org; arc=none smtp.remote-ip=78.47.171.185 X-Received: from proxima.lasnet.de (proxima.lasnet.de [78.47.171.185]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E331C606A6A9; Wed, 2 Dec 2026 08:22:40 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E331C606A6A9 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=datenfreihafen.org X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=datenfreihafen.org X-Received: from work.datenfreihafen.local (unknown [46.253.254.165]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: stefan@sostec.de) by proxima.lasnet.de (Postfix) with ESMTPSA id CF1C3C07E6; Wed, 2 Dec 2026 09:22:38 +0100 (CET) X-Cc: Stefan Schmidt <stefan@datenfreihafen.org>, linux-wpan@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org X-Mailer: git-send-email 2.56.1 X-In-Reply-To: <20261103102854.1340581-1-vulab@iscas.ac.cn> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list