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  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:   Sun, 8 Oct 2017 20:31:27 +0800
From:   Jia-Ju Bai <baijiaju1990@....com>
To:     patrik.r.jakobsson@...il.com, airlied@...ux.ie, bhelgaas@...gle.com
Cc:     dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        linux-pci@...r.kernel.org
Subject: [BUG] gma500: Possible sleep-in-atomic bugs in gma_resume_pci

The driver may sleep under a spinlock, and the function call paths are:
gma_power_begin (acquire the spinlock)
   gma_resume_pci
     pci_set_power_state
       __pci_start_power_transition (drivers/pci/pci.c)
         msleep --> may sleep

gma_power_begin (acquire the spinlock)
   gma_resume_pci
     pci_enable_device
       pci_enable_device_flags (drivers/pci/pci.c)
         do_pci_enable_device
           pci_set_power_state
             __pci_start_power_transition
               msleep --> may sleep

A possible fix is to replace msleep with mdelay in 
__pci_start_power_transition in drivers/pci/pci.c.

These bugs are found by my static analysis tool and my code review.


Thanks,
Jia-Ju Bai

Powered by blists - more mailing lists