lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Mon, 28 Feb 2022 14:41:33 +0800
From:   Zheyu Ma <zheyuma97@...il.com>
To:     maintainers@...echerrydvr.com, anton@...p.bluecherry.net,
        andrey_utkin@...tmail.com, ismael@...ev.co.uk, mchehab@...nel.org
Cc:     linux-media@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: [BUG] media: solo6x10: Disabling already-disabled device in free_solo_dev

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ