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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <DM6PR11MB38195CE729A5765E019C226285619@DM6PR11MB3819.namprd11.prod.outlook.com>
Date:   Wed, 24 Nov 2021 15:59:57 +0000
From:   "Wu, Hao" <hao.wu@...el.com>
To:     Jia-Ju Bai <baijiaju1990@...il.com>,
        "trix@...hat.com" <trix@...hat.com>,
        "mdf@...nel.org" <mdf@...nel.org>
CC:     "linux-fpga@...r.kernel.org" <linux-fpga@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: RE: [BUG] fpga: dfl: possible ABBA deadlock in
 dfl_fpga_cdev_assign_port() and fme_pr()

> 
> dfl_fpga_cdev_assign_port()
>    mutex_lock(&cdev->lock); --> Line 1067 (Lock A)
>    mutex_lock(&pdata->lock); --> Line 1624 (Lock B)

This lock is from port platform device.

> 
> fme_pr()
>    mutex_lock(&pdata->lock); --> Line 126 (Lock B)

This lock is from fme platform device.

Actually they are different locks, but yes, maybe we should consider
improving the naming to avoid misunderstanding.

Thanks
Hao

>    fpga_region_program_fpga()
>      fpga_bridges_enable()
>        fpga_bridge_enable()
>          fme_bridge_enable_set() --> function pointer via
> "bridge->br_ops->enable_set()"
>            dfl_fpga_cdev_find_port()
>              mutex_lock(&cdev->lock); --> Line 499 (LockA)
> 
> When dfl_fpga_cdev_assign_port() and fme_pr() are concurrently executed,
> the deadlock can occur.
> 
> I am not quite sure whether this possible deadlock is real and how to
> fix it if it is real.
> Any feedback would be appreciated, thanks
> 
> Reported-by: TOTE Robot <oslab@...nghua.edu.cn>
> 
> 
> Best wishes,
> Jia-Ju Bai

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ