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 -
| Linus Torvalds | Re: BUG: mmapfile/writev spurious zero bytes (x86_64/not i386, bisected, reproduca... |
| J.C. Pizarro | Re: linux+glibc memory allocator, poor performance |
| Greg Kroah-Hartman | [PATCH 012/196] nozomi driver |
| Vladislav Bolkhovitin | Re: [Scst-devel] Integration of SCST in the mainstream Linux kernel |
git: | |
| Peter Karlsson | RCS keyword expansion |
| Dennis Schridde | Odd number of elements in anonymous hash |
| Andy Parkins | svn:externals using git submodules |
| Andreas Hildebrandt | CVS-$Id:$ replacement in git? |
| Jarek Poplawski | [PATCH 00/14]: Killing qdisc->ops->requeue(). |
| jamal | [PATCH 2/3][NET_BATCH] net core use batching |
| Patrick McHardy | pkt_sched: add DRR scheduler |
| Marcel Holtmann | Bluetooth fixes for 2.6.27 |
| Charlie Clark | openbsd fail2ban |
| Richard Stallman | Real men don't attack straw men |
| Juan Miscaro | Not updating .libs-XXXXX, remember to clean it (huh?) |
| Der Engel | vlan trunking OpenBSD/Cisco switch |
