From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_NEOMUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F442C04AAF for ; Thu, 16 May 2019 12:43:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DD79720815 for ; Thu, 16 May 2019 12:43:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727258AbfEPMnE (ORCPT ); Thu, 16 May 2019 08:43:04 -0400 Received: from orcrist.hmeau.com ([5.180.42.13]:45812 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726696AbfEPMnE (ORCPT ); Thu, 16 May 2019 08:43:04 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1hRFii-0002OK-A7; Thu, 16 May 2019 20:42:48 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1hRFiW-0004a1-4X; Thu, 16 May 2019 20:42:36 +0800 Date: Thu, 16 May 2019 20:42:36 +0800 From: Herbert Xu To: David Laight Cc: Jakub Kicinski , "davem@davemloft.net" , "tgraf@suug.ch" , "netdev@vger.kernel.org" , "oss-drivers@netronome.com" , "neilb@suse.com" , Simon Horman Subject: Re: [PATCH 2/2] rhashtable: Fix cmpxchg RCU warnings Message-ID: <20190516124236.m5p3zm27kjgtzzvf@gondor.apana.org.au> References: <20190516051622.b4x6hlkuevof4jzr@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, May 16, 2019 at 09:20:36AM +0000, David Laight wrote: > > I presume these casts remove an 'rcu' marker on the variable. > Is there a way of marking such casts as 'for sparse only' so > that the compiler does proper type checking. > (Clearly this isn't that relevant here as the cast could be (void **).) > > Hmmm something should be checking that the type of the argument > to cmpxchg is 'pointer to "something the size of a pointer"' > Adding any kind of cast subverts that test. If we were adding this as an RCU primitive then yes that what it should do. But it isn't relevant to this patch. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt