Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp505267ybl; Tue, 28 Jan 2020 07:01:59 -0800 (PST) X-Google-Smtp-Source: APXvYqxULxk2OTsZDuOMMaokL01sDzw8ne0Ue1LbWc/JNv4GHWJ7ieLKzJSOhgTCupoVqSEXUS/z X-Received: by 2002:aca:3f54:: with SMTP id m81mr2978980oia.73.1580223719383; Tue, 28 Jan 2020 07:01:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580223719; cv=none; d=google.com; s=arc-20160816; b=fGeDDN4gFH9IZfUEzJ1rIcWoUutXH1Dk+W6USd/bvI0zDB2k+4AUIE523AuF47Dl6j gOKJSqQASeyzm4hy6zBSaYzwJsR8K24/ALifVSBsh8HP1YbtbXm09T4DY2hl8z6jDGFc kbIaXIqvYBIIxDlJGdqcl42/d+zUhn7TziliTwJnwVDn2ddn0kfI5A8q4uwn7Sm8aWeJ 4XnMRxe0zorCmVhdz0xODFQVQmQHbFHQESKTDjPz7poRTXm6It4g6YRq2OiluX2cBtQp l6W2T1lFrKrW+6gSYJPtl6Wj51lQxBReO7zOdVIvm+5kQTTNu6y+p/lUtQ7rPFPIu6Ps QIBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-id:mime-version :subject:cc:to:references:in-reply-to:from:organization :dkim-signature; bh=JC/v0R+n19poVshHaFB2ikrnZeGzcPgJ7gdAXwWxsCA=; b=QwGJI971HMzVVIFLGf1OWFA21m4SCHkzPpK7H1MPqpzshTDQc14c9jXR3gN7JnfMeg vby2RCL8XWKpb4QFMOrGQBAejoxcgfH0Jl1RAB/XqGzMltJviJHlLWGEsm3fIws1JHJn fMxXvMaoWGlimLsm69RdNdfiLUjE3MDvjBZoAsB4g0aZweL+I1ZGAkTTyUr6O41Bipif 8DqmaqaUSaHJkYCuNWlo3JtXkvtphk64VaLzfSkTu8GfhUtDJTHQbi8kBLsNEanCtBNv Njt66N4yQrx4cTUIv9VO1GXQMM4K9ocVKhHCj91kf4dron80xP4DHaY2PHjSwZAeBOCP 0c9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=azEWFPlV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id g24si2598710otj.59.2020.01.28.07.01.39; Tue, 28 Jan 2020 07:01:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=azEWFPlV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726770AbgA1PAX (ORCPT + 99 others); Tue, 28 Jan 2020 10:00:23 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:25951 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726712AbgA1PAX (ORCPT ); Tue, 28 Jan 2020 10:00:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580223622; 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=JC/v0R+n19poVshHaFB2ikrnZeGzcPgJ7gdAXwWxsCA=; b=azEWFPlVR0TJB7UsQJ83sYRnenvVydFJ8EKaB/mh5Q9BT3VFCK/NH1cW8Ii+WQtgW6tyiW 7mitqXt6f7PBl5lirzw7iPd2TbL512P8LFYolAmh0BBhzPUVU9VMPBNKc4/HaUXzDWqomO rj8SS8a0eVXItK2Bf6dRHeTocP0tQ9Y= 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-40-Ezdjjf2gPp-tKiDpGIq6Jg-1; Tue, 28 Jan 2020 10:00:17 -0500 X-MC-Unique: Ezdjjf2gPp-tKiDpGIq6Jg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9524513F5; Tue, 28 Jan 2020 15:00:15 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-121-70.rdu2.redhat.com [10.10.121.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id D56015DA7E; Tue, 28 Jan 2020 15:00:10 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20200128072740.21272-1-frextrite@gmail.com> References: <20200128072740.21272-1-frextrite@gmail.com> To: Amol Grover Cc: dhowells@redhat.com, Shakeel Butt , James Morris , Oleg Nesterov , Kees Cook , Thomas Gleixner , Jann Horn , linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, Joel Fernandes , Madhuparna Bhowmik , "Paul E . McKenney" Subject: Re: [PATCH] cred: Use RCU primitives to access RCU pointers MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2176479.1580223610.1@warthog.procyon.org.uk> Date: Tue, 28 Jan 2020 15:00:10 +0000 Message-ID: <2176480.1580223610@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Amol Grover wrote: > task_struct.cred and task_struct.real_cred are annotated by __rcu, > hence use rcu_access_pointer to access them. > > Fixes the following sparse errors: > kernel/cred.c:144:9: error: incompatible types in comparison expression > (different address spaces): > kernel/cred.c:144:9: struct cred * > kernel/cred.c:144:9: struct cred const [noderef] * > kernel/cred.c:145:9: error: incompatible types in comparison expression > (different address spaces): > kernel/cred.c:145:9: struct cred * > kernel/cred.c:145:9: struct cred const [noderef] * > > Signed-off-by: Amol Grover Reviewed-by: David Howells