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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jarek Poplawski
Date: Friday, September 21, 2007 - 1:44 am

On Thu, Sep 20, 2007 at 03:08:42PM +0200, Nadia Derbey wrote:
...

Yes, IMHO, it should be at least more readable when we can see where
this RCU is really needed.

But, after 3-rd look, I have a few more doubts (btw., 3 looks are
still not enough for me with this code, so I cerainly can miss many
things here, and, alas, I manged to see util and msg code only):

1. ipc_lock() and ipc_lock_check() are used without ipc_ids.mutex,
but it's probably wrong: they call idr_find() with ipc_ids pointer
which needs this mutex, just like in similar code in: ipc_findkey(),
ipc_get_maxid() or sysvipc_find_ipc().

2. I'm not sure this refcounting with ipc_rcu_getref/putref is SMP
safe (memory barriers): it's not atomic, so locking is needed, but
e.g. in do_msgsnd() kern_ipc_perm lock is used for this, while
freeque() calls ipc_rcu_putref() with ipc_ids mutex only.

3. Probably similar problem is possible with msr_d.r_msg which is
read in do_msgrcv() under rcu_read_lock() only.

Regards,
Jarek P.
-
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, 2:17 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Andrew Morton, (Tue Sep 18, 2:42 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Andrew Morton, (Tue Sep 18, 3:17 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Andrew Morton, (Tue Sep 18, 3:27 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Nadia Derbey, (Tue Sep 18, 3:30 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Alexey Dobriyan, (Tue Sep 18, 3:32 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Andrew Morton, (Tue Sep 18, 3:34 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Nadia Derbey, (Tue Sep 18, 7:55 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Andrew Morton, (Tue Sep 18, 10:01 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Jarek Poplawski, (Wed Sep 19, 7:07 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Nadia Derbey, (Wed Sep 19, 11:24 pm)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Jarek Poplawski, (Thu Sep 20, 12:28 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Jarek Poplawski, (Thu Sep 20, 1:21 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Nadia Derbey, (Thu Sep 20, 1:52 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Nadia Derbey, (Thu Sep 20, 6:08 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Jarek Poplawski, (Thu Sep 20, 6:19 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Jarek Poplawski, (Thu Sep 20, 6:26 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Jarek Poplawski, (Fri Sep 21, 1:44 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Nadia Derbey, (Fri Sep 21, 2:18 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Nadia Derbey, (Fri Sep 21, 3:11 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Jarek Poplawski, (Fri Sep 21, 4:03 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Jarek Poplawski, (Fri Sep 21, 4:15 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Jarek Poplawski, (Sun Sep 23, 11:54 pm)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Jarek Poplawski, (Mon Sep 24, 12:43 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Nadia Derbey, (Mon Sep 24, 1:18 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Nadia Derbey, (Mon Sep 24, 2:50 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Jarek Poplawski, (Tue Sep 25, 4:47 am)
Re: 2.6.23-rc6-mm1: IPC: sleeping function called ..., Jarek Poplawski, (Tue Sep 25, 11:13 pm)