All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] media: solo6x10: Disabling already-disabled device in free_solo_dev
@ 2022-02-28  6:41 Zheyu Ma
  0 siblings, 0 replies; only message in thread
From: Zheyu Ma @ 2022-02-28  6:41 UTC (permalink / raw)
  To: maintainers, anton, andrey_utkin, ismael, mchehab
  Cc: linux-media, Linux Kernel Mailing List

Hi,

I found a bug during the process of probing.

The function call of v4l2_device_register() maybe failed, and then the
driver will call free_sole_dev(). In this function, the driver will do
some cleanup work such as pci_disable_device(), but now the PCI device
is not enabled ever, which can cause a warning of the kernel.

The root cause of this bug is that the driver does not handle the
failures properly, the driver should split the error handling and
handle it differently depending on the error.

The following log can reveal the bug:
[  115.920219] solo6x10 0000:00:04.0: disabling already-disabled device
[  115.920255] WARNING: CPU: 5 PID: 489 at drivers/pci/pci.c:2202
pci_disable_device+0x27a/0x380
[  115.923962] RIP: 0010:pci_disable_device+0x27a/0x380
[  115.932590] Call Trace:
[  115.932806]  <TASK>
[  115.932990]  free_solo_dev+0x1d4/0x270 [solo6x10]
[  115.933413]  ? solo_pci_probe+0x165/0xb70 [solo6x10]
[  115.933865]  solo_pci_probe+0x21b/0xb70 [solo6x10]
[  115.934954]  local_pci_probe+0x13f/0x210
[  115.935288]  pci_device_probe+0x34c/0x6d0

Regards,
Zheyu Ma

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-28  6:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-28  6:41 [BUG] media: solo6x10: Disabling already-disabled device in free_solo_dev Zheyu Ma

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.