Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1248895ybi; Fri, 24 May 2019 20:59:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKsAxjqmtPWctT6onKHi2lPjKSlWR+vsTiBnn7fUpkmlRfd7M2XY7rM5APdz7CAeLl1E82 X-Received: by 2002:a63:1a5e:: with SMTP id a30mr12491874pgm.433.1558756757980; Fri, 24 May 2019 20:59:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558756757; cv=none; d=google.com; s=arc-20160816; b=fsMVscymWJPK+qBh+/mthDfw6k3Q3x5eEqQqNx9BQqLKZ29OxDO/g3i1lEW8L2K4cp EQrrKFu3ovop9DyKZs7d94RgpyGqq8eEot7qOK/QYOF3iou0ZdtIABLDkZtnW7ip91mf 3G7cQq9a+iwdgR8GwDzhx7/TpDp9AoGPCQ4y0NtNwZuHpv7u1V2t0wCDi3Yg/hVCM6iJ xmui6y1UTAObWdBHwfjsy7s5aVM6A4qcTVkqRB8mw2W3hiXNS8acQ7Qo/sYLhiYEW27r Qxzb+2no8ZpnUI1n009t09kABY/LwrKycSqK6dDa9c0XJ6hVEWl4uBx15cXRqeKymzCR 2FDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=kCVC2X45F7Fdr5G2fLCh16CF7TnSWj6qz+a6RizxjQE=; b=G8gbsVZGI6mn0CwJbYAoM+AgB8LAu/2AQFWt2EuOR6b+jcaqsje4mm321R/wylIlGY L2y7KloYlug1o/wL6FQBMnGaSffDxErtw0caiH2DLd1oT815stPYA2pLendJpqWKrpD1 E+xj35WmTgN2JVOXx+U6SDW0a/Dr8Btw6b+nWQclbdtWbs/dQRHnphl9AHWtad06tkMv mSOssC6rG2Sw4pCTDUAy3wk8LLKxgQ6dbmHfPKnwXU9RTUz/8qeN1HcnQxyt2F2gJmj/ tClrjWBiymsZ45nN4Hh1Hv5ru6+um6W5cwjJ+ZzrwrA2C26qDhptrb8NFElAKoLi4lrR tnSw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e8si1213530plb.420.2019.05.24.20.58.52; Fri, 24 May 2019 20:59:17 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726753AbfEYD5F (ORCPT + 99 others); Fri, 24 May 2019 23:57:05 -0400 Received: from namei.org ([65.99.196.166]:34400 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726587AbfEYD5F (ORCPT ); Fri, 24 May 2019 23:57:05 -0400 Received: from localhost (localhost [127.0.0.1]) by namei.org (8.14.4/8.14.4) with ESMTP id x4P3v2RL032377; Sat, 25 May 2019 03:57:02 GMT Date: Sat, 25 May 2019 13:57:02 +1000 (AEST) From: James Morris To: David Howells cc: keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/7] keys: sparse: Fix incorrect RCU accesses In-Reply-To: <155856409697.10428.15024260088836364169.stgit@warthog.procyon.org.uk> Message-ID: References: <155856408314.10428.17035328117829912815.stgit@warthog.procyon.org.uk> <155856409697.10428.15024260088836364169.stgit@warthog.procyon.org.uk> User-Agent: Alpine 2.21 (LRH 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 22 May 2019, David Howells wrote: > Fix a pair of accesses that should be using RCU protection. > > rcu_dereference_protected() is needed to access task_struct::real_parent. > > current_cred() should be used to access current->cred. > > Signed-off-by: David Howells Reviewed-by: James Morris -- James Morris