Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1254575ybm; Wed, 22 May 2019 20:51:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqwHzNHPq/h32SXa80GIX6OAUXzyNtTXh/7Byz+CQcrxvXjSr/SYVQUdOwL4JomQZz52l7FI X-Received: by 2002:a63:a1a:: with SMTP id 26mr94084097pgk.11.1558583490465; Wed, 22 May 2019 20:51:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558583490; cv=none; d=google.com; s=arc-20160816; b=nhEmRR55kyshX34de46LsPIEBbncDVvQeo9h9pDyUVIg9rT+NQfyf2oohNrBQkDB5B RRPYlHJ1ANf8ImsaPHqhSHE9w/yWaVVOti6IsHkQCwcrUY94EB4+l21ji9DiDYkXpHSF W2h1/miBZOmHl1RxHuK7iA/AAB1S/rU3fQOIvT7Vm/wdM+6ZZcCAFnZ5KsuXra8Wsu5S Zeks64iJL4TbKBe4ODCTUTBMQVvLKpf9lX048bSuvpVR/gz5sYOjNnDajSoBAsCRNICN LFbJkD5Cq04JFZ5IMUxItds7TxFUd79w/7QUeFTXKmRibMuQLCxPuUMAqpxDZevkIIy3 HN5A== 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:dmarc-filter:dkim-signature:dkim-signature; bh=oldVoqd5nRpo3PDxda3VIUap0l91/hcyr+0QhcEiHNY=; b=Tfb9Q03+ZPyeu8UgRPlIBc3ZkSoRaVvYtcKb4ch6rZ9NRXb3oR2crxczudQ00VZGOT mBRHhCpxHGyal/aHcc4x9XSVj22lZwNt1vu4niof6Gu11JpNW2O7yMtT0yrYLoWfCjdE RMcNcFMRfdIgYTEWivbKH4FmWTBg+mqk1163sfb+JgwYZ9SF2c/ULbUeyHfFP5KbOaCH K8Khzb27sSmACCEOJBrmS037g/fXBmFzcDXNyTw1llZbn8GZeumeM13EpJSXrXgouLlU 7bWvNymXfaEFM3Dger2NWxLHG3wZa9ES57lzc8H48TUys4S/Qd6qiEDoD3EdUjPcwxda R4gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=P6dAJzkr; dkim=pass header.i=@codeaurora.org header.s=default header.b=MTQCPFe1; 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 d5si25363943pla.376.2019.05.22.20.51.15; Wed, 22 May 2019 20:51:30 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=P6dAJzkr; dkim=pass header.i=@codeaurora.org header.s=default header.b=MTQCPFe1; 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 S1729621AbfEWDuD (ORCPT + 99 others); Wed, 22 May 2019 23:50:03 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:58332 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726326AbfEWDuD (ORCPT ); Wed, 22 May 2019 23:50:03 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 673AC607C3; Thu, 23 May 2019 03:50:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1558583402; bh=Hrr/PtP34IJ2Z7aiXFVzZQp9WZiRECimfmz68C6xDyM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=P6dAJzkreK0A4OhMbsOZBw3zWV8by0C0/zoxpH9DyRE9yxfyIZzSHbeA4AyitwEyO B2gpo+ZVxRcQWOXH9Bx7O45aKdfRs27gHgYfvv1W/sX3aeIHHFJb/cFLgbLIjd4tMg R8jW6nRGZqAAvKeegm69tbKB2Jf1JCxZShkhHmEY= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from codeaurora.org (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: stummala@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 0EF566025A; Thu, 23 May 2019 03:49:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1558583401; bh=Hrr/PtP34IJ2Z7aiXFVzZQp9WZiRECimfmz68C6xDyM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MTQCPFe1tKOYi39hkVr4OJ6GVlKGOWoH04qTUR+MgZW5iYuM5YKe1R/2RFEhLTJO6 tBmsbE5GuwbMXKeslIixBz2WnpLv08eoBG9bDrjGcsgdULGMeQyxz1gODc14INZFUr RLb+s3PsrCuMpW8mzNMwSWutfYIGUBprV4b9pjuc= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 0EF566025A Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=stummala@codeaurora.org Date: Thu, 23 May 2019 09:19:56 +0530 From: Sahitya Tummala To: Christoph Hellwig Cc: Junxiao Bi , Joel Becker , Al Viro , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] configfs: Fix use-after-free when accessing sd->s_dentry Message-ID: <20190523034956.GA10043@codeaurora.org> References: <1546514295-24818-1-git-send-email-stummala@codeaurora.org> <20190131032011.GC7308@codeaurora.org> <0081e5c8083f5ed9f1c1e9b456739728@codeaurora.org> <20190517082312.GA13457@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190517082312.GA13457@lst.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 17, 2019 at 10:23:12AM +0200, Christoph Hellwig wrote: > On Thu, May 16, 2019 at 06:27:53PM +0530, stummala@codeaurora.org wrote: > > Hi Christoph, Al, > > > > Can you please consider this patch for merging? > > I've been sitting on this for a while, mostly because I can't convince > myself it is safe. What protects other threads from using ->s_dentry > just when we clear it? Also why would sd->s_dentry == dentry ever be > false? Thanks Christoph for getting back on this. I will try to find answers to your queries and get back on this. Besides, Al Viro reviewed this patch [1] and commented that fix looks good. Hence, I was following up to get this merged as I thought it must be a miss to not pick it up :) [1] - https://lkml.org/lkml/2019/1/3/47 Thanks, Sahitya. -- -- Sent by a consultant of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.