Re: [PATCH][ATM] use rtnl_{lock,unlock} during device operations (take 2)

From: chas williams (
Date: Fri Jun 06 2003 - 05:58:20 EST

In message <>,"David S. Miller" writes:
>Are you sure nothing needs to walk the list in interrupt or softint
>context? That's why you can't normally protect all of it using the
>RTNL semaphore, because walks occur in non-sleepable contexts.

oddly enough, i dont believe the list is iterated in interrupt

>Read the comment above dev_base in drivers/net/Space.c to see what
>the intended locking model is.

yeah, i already read that. it has a bit of a typo (rtln indeed).
it looks like rtnl_lock() is also used to protect dev_ioctl's
(thus my usage in atm_ioctl) and protect lookup's like __dev_get_by_name.
i didnt get rid of atm_dev_lock, i just dont use it unless writing
or if i couldnt safely use rtnl when a reader is iterating (like
atm_dev_hold() which could be called at interrupt--though no one does).
i thought this was the idea.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Jun 07 2003 - 22:00:30 EST