Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752261Ab3CBBO6 (ORCPT ); Fri, 1 Mar 2013 20:14:58 -0500 Received: from mail-vc0-f178.google.com ([209.85.220.178]:60728 "EHLO mail-vc0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751298Ab3CBBO5 (ORCPT ); Fri, 1 Mar 2013 20:14:57 -0500 MIME-Version: 1.0 In-Reply-To: <1362183400.3420.24.camel@buesod1.americas.hpqcorp.net> References: <1362183400.3420.24.camel@buesod1.americas.hpqcorp.net> Date: Fri, 1 Mar 2013 17:14:56 -0800 X-Google-Sender-Auth: GUO_9FalAqxQGPJjV-A3D_arTsE Message-ID: Subject: Re: [RFC PATCH 1/2] ipc: introduce obtaining a lockless ipc object From: Linus Torvalds To: Davidlohr Bueso Cc: Rik van Riel , "Vinod, Chegu" , "Low, Jason" , linux-tip-commits@vger.kernel.org, Peter Zijlstra , "H. Peter Anvin" , Andrew Morton , aquini@redhat.com, Michel Lespinasse , Ingo Molnar , Larry Woodman , Linux Kernel Mailing List , Steven Rostedt , Thomas Gleixner Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 904 Lines: 25 On Fri, Mar 1, 2013 at 4:16 PM, Davidlohr Bueso 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-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/