Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp827116ybi; Fri, 24 May 2019 12:06:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxyr7UxoZn7kMW6LyxR0JiJaeAQxYQ7oQbbFJiK81FaPb9dPSgoII0jevdrygX9QIm7z8DU X-Received: by 2002:a65:614a:: with SMTP id o10mr90602166pgv.258.1558724802459; Fri, 24 May 2019 12:06:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558724802; cv=none; d=google.com; s=arc-20160816; b=EJMBz7d3EDVs7SoQIvTokJHutggxLGZCCEpY4iWQk5Vp67rm4g/3uX4l5yvvMZusmM z/6Vg9atKb/1Yhao5qJM9NzI04Ymsp8HZtftW55PNzVfyIHX1pYe1jqOI/S2CS4Ot21W T54Ins3qUoTrss67/AnZqtaNKFHeia/vmn0JSf137LS9snKzlfsQaAuEaffYuXERexB6 fs7qnEZ8l80BiZnl03CH98ZZ/nMUDgVIcpJLwbuefBsj8wz1RYWbGGUJuBorwLIlZvWd jDGWLr2O7Lv67v7iKNArV4kS+mGMtF1N1ojMo+MvaTSKtxlpfpTkHjWMsHngDfWMtTpe fjcw== 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=aUiLgi3EwXkIlR8WSidGYiHgouWUwpqI0zGVPqMFbtA=; b=XxbSaC6CQdXtcLul2CVFF4C/0/HnKrBtTd3d6fF5gQmtz4B75lIp2c8VBZu122f4ir k6ACE7+GbeD4Cwp1foTUE4K3FeJNftHZET+/xgTBN04mvYhuDwvSIpilF2H0fhzr91dp xqg1AU1F8U9DeQnNT3yoKA97iID0UECZEz5nfEOLjIGtuQkHaaaVCn1hmBOiSUq6tgNj 0gK3b5W9+jVs9OqtPz3HRCU/gOmRQioLyOKDESSWFHxjPUKF5AkqNGVjrIyieC7XSFHr 2wHGXp/4zedGXSxXFXM2JIaSEiydwdiHB1DB8Fddm5fpy1M2qvW9FxEA5QpD7wB06lMm ///w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NwJLeqRF; 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 q87si5755748pfa.201.2019.05.24.12.06.26; Fri, 24 May 2019 12:06:42 -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=@kernel.org header.s=default header.b=NwJLeqRF; 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 S1729990AbfEXTEq (ORCPT + 99 others); Fri, 24 May 2019 15:04:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:36190 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727115AbfEXTEq (ORCPT ); Fri, 24 May 2019 15:04:46 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4291B21848; Fri, 24 May 2019 19:04:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558724685; bh=1Otej3DqW8kLZe+otOAU42a39fB+op/iRkL/qfZt6fg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NwJLeqRFtTod+iPoBP/acd7TE4ryKxbyswv6Fpy55OK9uiD+XFkAvnx6y2TJtSsR5 WsD5YNJLSWx7SKouF3NC7IDgLog9/Gn8ermSMQbQ1dhTfRgWvRgKRYxd3EYIGYnS+9 yVWCGDay8rhC1zBPnQn4GelPufHKIaDoB4xmCChA= Date: Fri, 24 May 2019 21:04:43 +0200 From: Greg KH To: Muchun Song Cc: rafael@kernel.org, benh@kernel.crashing.org, prsood@codeaurora.org, mojha@codeaurora.org, gkohli@codeaurora.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, zhaowuyun@wingtech.com Subject: Re: [PATCH v4] driver core: Fix use-after-free and double free on glue directory Message-ID: <20190524190443.GB29565@kroah.com> References: <20190516142342.28019-1-smuchun@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190516142342.28019-1-smuchun@gmail.com> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 16, 2019 at 10:23:42PM +0800, Muchun Song wrote: > There is a race condition between removing glue directory and adding a new > device under the glue directory. It can be reproduced in following test: Is this related to: Subject: [PATCH v3] drivers: core: Remove glue dirs early only when refcount is 1 ? If so, why is the solution so different? thanks, greg k-h