netdev
[Top] [All Lists]

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

To: chas3@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: [RFC] add rtnl semaphore to linux-atm
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Wed, 1 Oct 2003 05:42:26 -0700
Cc: chas@xxxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <200310011134.h91BYPkT003172@ginger.cmf.nrl.navy.mil>
References: <200310011134.h91BYPkT003172@ginger.cmf.nrl.navy.mil>
Sender: netdev-bounce@xxxxxxxxxxx
On Wed, 01 Oct 2003 07:34:25 -0400
chas williams <chas@xxxxxxxxxxxxxxxx> 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.

<Prev in Thread] Current Thread [Next in Thread>