Re: [RFC PATCH 1/2] ipc: introduce obtaining a lockless ipc object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [RFC PATCH 1/2] ipc: introduce obtaining a lockless ipc object
- From: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 1 Mar 2013 17:14:56 -0800
- Cc: Rik van Riel <riel@xxxxxxxxxx>, "Vinod, Chegu" <chegu_vinod@xxxxxx>, "Low, Jason" <jason.low2@xxxxxx>, linux-tip-commits@xxxxxxxxxxxxxxx, Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, aquini@xxxxxxxxxx, Michel Lespinasse <walken@xxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Larry Woodman <lwoodman@xxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>
- In-reply-to: <1362183400.3420.24.camel@buesod1.americas.hpqcorp.net>
On Fri, Mar 1, 2013 at 4:16 PM, Davidlohr Bueso <davidlohr.bueso@xxxxxx> wrote:
>
> +struct kern_ipc_perm *ipc_obtain_object(struct ipc_ids *ids, int id)
This looks good..
> +struct kern_ipc_perm *ipc_obtain_object_check(struct ipc_ids *ids, int id)
The comment on ipc_checkid() says that it should only be called with
the lock held.
Which seems entirely bogus, and I think it's just stale. It's just
checking the same ipc->seq that is only set at allocation, so it won't
change, afaik.
So I *think* the above is ok, but I'd want people to look at that
comment and remove it if it is stale. And if it's not stale, think
about this.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Stable Commits]
[Linux Stable Kernel]
[Linux Kernel]
[Linux USB Devel]
[Linux Video &Media]
[Linux Audio Users]
[Yosemite News]
[Linux SCSI]