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=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 EADAAC282E3 for ; Fri, 24 May 2019 19:38:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CD76F2133D for ; Fri, 24 May 2019 19:38:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391662AbfEXTim (ORCPT ); Fri, 24 May 2019 15:38:42 -0400 Received: from namei.org ([65.99.196.166]:34320 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730068AbfEXTil (ORCPT ); Fri, 24 May 2019 15:38:41 -0400 Received: from localhost (localhost [127.0.0.1]) by namei.org (8.14.4/8.14.4) with ESMTP id x4OJcdxh008796; Fri, 24 May 2019 19:38:39 GMT Date: Sat, 25 May 2019 05:38:39 +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 1/7] keys: sparse: Fix key_fs[ug]id_changed() In-Reply-To: <155856409010.10428.11692778420533145488.stgit@warthog.procyon.org.uk> Message-ID: References: <155856408314.10428.17035328117829912815.stgit@warthog.procyon.org.uk> <155856409010.10428.11692778420533145488.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: > Sparse warnings are incurred by key_fs[ug]id_changed() due to unprotected > accesses of tsk->cred, which is marked __rcu. > > Fix this by passing the new cred struct to these functions from > commit_creds() rather than the task pointer. > > Signed-off-by: David Howells Reviewed-by: James Morris -- James Morris