login
Header Space

 
 

Re: 2.6.23-rc6-mm1: IPC: sleeping function called ...

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jarek Poplawski <jarkao2@...>
Cc: Andrew Morton <akpm@...>, Alexey Dobriyan <adobriyan@...>, <linux-kernel@...>
Date: Monday, September 24, 2007 - 4:18 am

Jarek Poplawski wrote:

If msgsnd() acquires the pointer first, it does it under lock + 
rcu_getref(). ==> refcount = 2
When schedule() is called if freeque() takes the pointer it will call 
msg_rmid() that sets the deleted field in the msg queue. When the lock 
is released by freeque(), we have either 1) or 2):
1) freeque()'s putref called 1st ==> refocunt = 1
    Then msgsnd()'s lock_by_ptr() is called ==> rcu lock
    Then msgsnd()'s putref is called ==> refcount = 0
    But this is done under RCU lock, so should be no problem
    Then the deleted field is checked ==> return
2) msgsnd()'s lock_by_ptr() is called ==> rcu lock
    Then we don't mind in which order are done the other operations
    since we under rcu_lock: the structure won't disappear till we test
    the deleted field.

Regards,
Nadia

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.23-rc6-mm1: IPC: sleeping function called ..., Alexey Dobriyan, (Tue Sep 18, 5:17 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Andrew Morton, (Tue Sep 18, 6:27 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Nadia Derbey, (Tue Sep 18, 10:55 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Jarek Poplawski, (Wed Sep 19, 10:07 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Nadia Derbey, (Thu Sep 20, 2:24 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Jarek Poplawski, (Thu Sep 20, 3:28 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Nadia Derbey, (Thu Sep 20, 4:52 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Jarek Poplawski, (Thu Sep 20, 9:19 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Nadia Derbey, (Thu Sep 20, 9:08 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Jarek Poplawski, (Fri Sep 21, 4:44 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Nadia Derbey, (Mon Sep 24, 5:50 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Jarek Poplawski, (Tue Sep 25, 7:47 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Jarek Poplawski, (Wed Sep 26, 2:13 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Nadia Derbey, (Fri Sep 21, 6:11 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Jarek Poplawski, (Fri Sep 21, 7:03 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Jarek Poplawski, (Mon Sep 24, 2:54 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Nadia Derbey, (Mon Sep 24, 4:18 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Jarek Poplawski, (Mon Sep 24, 3:43 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Jarek Poplawski, (Fri Sep 21, 7:15 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Jarek Poplawski, (Thu Sep 20, 9:26 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Jarek Poplawski, (Thu Sep 20, 4:21 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Andrew Morton, (Tue Sep 18, 1:01 pm)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Nadia Derbey, (Fri Sep 21, 5:18 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Alexey Dobriyan, (Tue Sep 18, 6:32 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Andrew Morton, (Tue Sep 18, 6:17 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Nadia Derbey, (Tue Sep 18, 6:30 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Andrew Morton, (Tue Sep 18, 6:34 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Andrew Morton, (Tue Sep 18, 5:42 am)
speck-geostationary