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] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 1 Feb 2020 09:23:20 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Taehee Yoo <ap420073@...il.com>
Cc:     David Miller <davem@...emloft.net>, Netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net v2 2/6] netdevsim: disable devlink reload when
 resources are being used

On Sat, 1 Feb 2020 18:37:58 +0900, Taehee Yoo wrote:
> > > +     mutex_lock(&nsim_bus_dev_ops_lock);  
> >
> > Not sure why we have to lock the big lock here?
> 
> The reason for using this lock is to protect "nsim_dev".
> nsim_dev_take_snapshot_write() uses nsim_dev.
> So if nsim_dev is removed while this function is being used,
> panic will occur.
> nsim_dev is protected by nsim_bus_dev_ops_lock.
> So, this lock should be used.

I see.

> But, I found deadlock because of this lock.
> Structurally, this lock couldn't be used in snapshot_write().
> So, I will find another way.

Could we perhaps use the lock in struct device? Seems like it would 
be a good fit for protecting nsim_dev?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ