Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp712468ybz; Wed, 15 Apr 2020 17:17:21 -0700 (PDT) X-Google-Smtp-Source: APiQypKq+xBCukJqRRCayu0U5Tt0kVLjUHK8nWc5yJJh592BU5h8vu9/ObzJ1gbpcO949C05bn77 X-Received: by 2002:a17:907:20ce:: with SMTP id qq14mr7153884ejb.10.1586996241665; Wed, 15 Apr 2020 17:17:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586996241; cv=none; d=google.com; s=arc-20160816; b=upKYDsi2oQm7kTgfYKRJWRarT8rNQmpOFY+hJgHCbmFTbNMMS8PaJMBYdNJDtmsdLl dLBHWLW2lEarOsJzEQIUtxh3f+uyk1syT0QpFMH2GBZRjhzexhEbHH4xEcnEiajyu/Ew LOABb0w8Yf0mqka4gS7/45qObHwk0h8xxnVTUXsy6OSEJiSYG/NFjDageFrkZXNWD57Q J+R8vmHpq1dWpUTLKK62wMLZpdkuYiwXIQlyihooC7+CF+5sOgoIF5/YPoIshljUZqYw TE3Os5C/udbj52qh7Jjtu6mrrN/eB6DVY9JyL3aBA7mP3Xpprkv7ZvAxbCMgqZVHKl58 K23g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=EOsn9WzC2Po9PCvhFuHMXouRRoh7kiQm7oVuP+zKwJQ=; b=N5ebD7bPL9YN0Nd2/vUZF5KCH+TNjwbpRlZvMj/eeF22I2CpUF+QKmiWSGDVOcmSQa LcXac4/xJLpnXPPI5fP6r/sRG0ZYFdjdgWiuQNLQnmx5mUxPl/OeZmLHQjtlnw9SrqLL H5Hp0vJtjhbm4hWT3kFrTnmgqETFdXDQhC4tdZquDJ61byWEZKK3MKBMfLpv0IqXZqpO FkRB/7w0LpLvI3RLaSE7337O/hcvjs7lT9oqR90pRI2U6WHY7dF4YNzDqOg7klMCXDGZ h34bfvPYQTmadhP5I/1Vmmv0d+YHupHSqXdnKZkZ/fdzFFmrN4Xe5ZM7AtInt6OcenUd CGTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hwn9oie7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g5si7124374edu.188.2020.04.15.17.16.57; Wed, 15 Apr 2020 17:17:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hwn9oie7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1414729AbgDOPem (ORCPT + 99 others); Wed, 15 Apr 2020 11:34:42 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:43876 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1414720AbgDOPee (ORCPT ); Wed, 15 Apr 2020 11:34:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586964873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EOsn9WzC2Po9PCvhFuHMXouRRoh7kiQm7oVuP+zKwJQ=; b=hwn9oie776lvjt1MqBo0gV5zgnVgT5cKDp/Se48IZ7faeO53EuvJl6TSEi4KMF7a7hwGMF s0XV6T2W3dRJSVDCvdU0eVd1Vv6fR72U1/zeIIjH7Y4oOMuo9dELnhE3M6JyhO144YeuT2 1dfFW/qWB3XaFUmajZvoBuB3SmemApI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-388-4X0w2peNPB6VLyvD1vLIJg-1; Wed, 15 Apr 2020 11:34:29 -0400 X-MC-Unique: 4X0w2peNPB6VLyvD1vLIJg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BCC2C6A6; Wed, 15 Apr 2020 15:34:27 +0000 (UTC) Received: from madcap2.tricolour.ca (unknown [10.3.128.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E200560BF1; Wed, 15 Apr 2020 15:34:20 +0000 (UTC) Date: Wed, 15 Apr 2020 11:34:17 -0400 From: Richard Guy Briggs To: Joel Fernandes Cc: Amol Grover , linux-kernel@vger.kernel.org, linux-audit@redhat.com, Shuah Khan , linux-kernel-mentees@lists.linuxfoundation.org Subject: Re: [PATCH v2] kernel: audit.c: Add __rcu notation to RCU pointer Message-ID: <20200415153417.svpbimg66vbeuk7u@madcap2.tricolour.ca> References: <20191128153203.GA23803@workstation-kernel-dev> <20191130020742.GF157739@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191130020742.GF157739@google.com> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-11-29 21:07, Joel Fernandes wrote: > On Thu, Nov 28, 2019 at 09:02:03PM +0530, Amol Grover wrote: > > add __rcu notation to RCU protected global pointer auditd_conn > > Again, please use proper punctuation and captilization. This is unacceptable. > Please put more effort into changelog. > > Otherwise the patch diff itself looks good to me, with the above nit > corrected, you could add my tag to the next revision: > > Reviewed-by: Joel Fernandes (Google) > > thanks, > > - Joel > > > > > Fixes multiple instances of sparse error: > > error: incompatible types in comparison expression > > (different address spaces) Amol or Joel: Is there a reproducer recipe for this? > > Signed-off-by: Amol Grover > > --- > > v2: > > - fix erroneous RCU pointer initialization > > > > kernel/audit.c | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > diff --git a/kernel/audit.c b/kernel/audit.c > > index da8dc0db5bd3..ff7cfc61f53d 100644 > > --- a/kernel/audit.c > > +++ b/kernel/audit.c > > @@ -102,12 +102,13 @@ struct audit_net { > > * This struct is RCU protected; you must either hold the RCU lock for reading > > * or the associated spinlock for writing. > > */ > > -static struct auditd_connection { > > +struct auditd_connection { > > struct pid *pid; > > u32 portid; > > struct net *net; > > struct rcu_head rcu; > > -} *auditd_conn = NULL; > > +}; > > +static struct auditd_connection __rcu *auditd_conn; > > static DEFINE_SPINLOCK(auditd_conn_lock); > > > > /* If audit_rate_limit is non-zero, limit the rate of sending audit records > > -- > > 2.24.0 - RGB -- Richard Guy Briggs Sr. S/W Engineer, Kernel Security, Base Operating Systems Remote, Ottawa, Red Hat Canada IRC: rgb, SunRaycer Voice: +1.647.777.2635, Internal: (81) 32635