login
Header Space

 
 

Re: [PATCH 2/7] CAN: Add PF_CAN core module

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Urs Thuermann <urs@...>
Cc: <netdev@...>, David Miller <davem@...>, Thomas Gleixner <tglx@...>, Oliver Hartkopp <oliver@...>, Oliver Hartkopp <oliver.hartkopp@...>
Date: Thursday, September 20, 2007 - 6:33 am

Urs Thuermann wrote:


No, you need to add your own locking to prevent this, something
list this:

registration/unregistration:

take lock
change proto_tab[]
release lock

lookup:

take lock
cp = proto_tab[]
if (cp && !try_module_get(cp->owner))
	cp = NULL
release lock



Why do you want to prevent it? The admin unloaded the module,
so he apparently doesn't want the operation to succeed.



I'm saying you need _rcu for the *read side*. All operations changing
the list already use the _rcu variants.



spin_lock_bh only disables BHs locally, other CPUs can still process
softirqs. And since rcv_lists_lock is only used in process context,
the BH disabling is actually not even necessary.

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 2/7] CAN: Add PF_CAN core module, Urs Thuermann, (Mon Sep 17, 6:03 am)
Re: [PATCH 2/7] CAN: Add PF_CAN core module, Patrick McHardy, (Tue Sep 18, 9:31 am)
Re: [PATCH 2/7] CAN: Add PF_CAN core module, Urs Thuermann, (Tue Sep 18, 5:20 pm)
Re: [PATCH 2/7] CAN: Add PF_CAN core module, Patrick McHardy, (Wed Sep 19, 4:27 am)
Re: [PATCH 2/7] CAN: Add PF_CAN core module, Urs Thuermann, (Thu Sep 20, 4:53 am)
Re: [PATCH 2/7] CAN: Add PF_CAN core module, Patrick McHardy, (Thu Sep 20, 6:33 am)
Re: [PATCH 2/7] CAN: Add PF_CAN core module, Urs Thuermann, (Thu Sep 20, 7:30 am)
Re: [PATCH 2/7] CAN: Add PF_CAN core module, Patrick McHardy, (Thu Sep 20, 7:43 am)
Re: [PATCH 2/7] CAN: Add PF_CAN core module, Urs Thuermann, (Tue Sep 18, 10:54 am)
Re: [PATCH 2/7] CAN: Add PF_CAN core module, Patrick McHardy, (Tue Sep 18, 11:07 am)
Re: [PATCH 2/7] CAN: Add PF_CAN core module, Paul E. McKenney, (Mon Sep 17, 11:50 am)
speck-geostationary