Subject: Re: [RFC] add rtnl semaphore to linux-atm

From: "David S. Miller" <[email-masked]>
Date: Wed, 1 Oct 2003 05:42:26 -0700

On Wed, 01 Oct 2003 07:34:25 -0400
chas williams <[email-masked]> wrote:

> i am thinking about doing the following to fix the race
> during ATM_ITF_ANY operation.  rtnl is held across 
> registration/unregistration.  this means that you can get
> read-only access to the device list by holding rtnl
> or a read_lock on atm_dev_lock similar to the scheme
> used by netdevice (or so i think).

This looks like it would work.

Although, unless VCC connect can potentially sleep, it might
be better to keep exporting the rwlock and take it as a reader
instead of grabbing the rtnl semaphore.