From: Dan Carpenter <dan.carpenter@linaro.org>
To: Pavan Kumar Yalagada <pavankumaryalagada@gmail.com>
Cc: parthiban.veerasooran@microchip.com,
christian.gromm@microchip.com, gregkh@linuxfoundation.org,
laurent.pinchart+renesas@ideasonboard.com,
hverkuil+cisco@kernel.org, linux-staging@lists.linux.dev,
linux-media@vger.kernel.org
Subject: Re: [PATCH v5] staging: most: video: prevent probes during component exit
Date: Wed, 3 Dec 2025 12:13:07 +0300 [thread overview]
Message-ID: <aS__I0Mbt4CFbZs5@stanley.mountain> (raw)
In-Reply-To: <20251203083411.7072-1-pavankumaryalagada@gmail.com>
On Wed, Dec 03, 2025 at 03:34:11AM -0500, Pavan Kumar Yalagada wrote:
> When comp_exit() runs, comp_probe_channel() could still add new devices
> to video_devices, creating a race and potentially leaving the list in
> an inconsistent state.
>
> This patch prevents new devices from being added while exiting by:
>
> - comp_probe_channel() checks comp_exiting before modifying video_devices.
>
> if (comp_exiting) {
> spin_unlock_irq(&list_lock);
> ret = -BUSY;
> goto err_unreg;
> }
>
> This ensures that all partially created resources are properly freed
> and no new channels are allowed while the driver is being unloaded.
>
> Signed-off-by: Pavan Kumar Yalagada <pavankumaryalagada@gmail.com>
There we go. Well done. :)
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
regards,
dan carpenter
prev parent reply other threads:[~2025-12-03 9:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-03 8:34 [PATCH v5] staging: most: video: prevent probes during component exit Pavan Kumar Yalagada
2025-12-03 9:05 ` Greg KH
2025-12-03 9:31 ` Dan Carpenter
2025-12-03 9:13 ` Dan Carpenter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aS__I0Mbt4CFbZs5@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=christian.gromm@microchip.com \
--cc=gregkh@linuxfoundation.org \
--cc=hverkuil+cisco@kernel.org \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=parthiban.veerasooran@microchip.com \
--cc=pavankumaryalagada@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox