From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932067AbeDZNZ4 (ORCPT ); Thu, 26 Apr 2018 09:25:56 -0400 Received: from mail-ot0-f196.google.com ([74.125.82.196]:38042 "EHLO mail-ot0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755074AbeDZNZz (ORCPT ); Thu, 26 Apr 2018 09:25:55 -0400 X-Google-Smtp-Source: AIpwx4/iqrph42Oa1sUbcaVF3w36v8Q7j/sdwhggB5gOdF/Vg+4qCUuyy3yFz4nKwY8hjvbQKHhPRdzs0kJAfu7EVpY= MIME-Version: 1.0 X-Originating-IP: [176.63.54.97] In-Reply-To: <20180423172135.4050588-2-songliubraving@fb.com> References: <20180423172135.4050588-1-songliubraving@fb.com> <20180423172135.4050588-2-songliubraving@fb.com> From: Miklos Szeredi Date: Thu, 26 Apr 2018 15:25:53 +0200 Message-ID: Subject: Re: [PATCH v5 2/2] tracing: remove igrab() iput() call from uprobes.c To: Song Liu Cc: linux-kernel@vger.kernel.org, kernel-team , Steven Rostedt , Ingo Molnar , Howard McLauchlan , Josef Bacik , Srikar Dronamraju Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 23, 2018 at 7:21 PM, Song Liu wrote: > Caller of uprobe_register is required to keep the inode and containing > mount point referenced. > > There was misuse of igrab() in uprobes.c and trace_uprobe.c. This is > because igrab() will not prevent umount of the containing mount point. > To fix this, we added path to struct trace_uprobe, which keeps the inode > and containing mount reference. > > For uprobes.c, it is not necessary to call igrab() in uprobe_register(), > as the caller is required to keep the inode reference. The igrab() is > removed and comments on this requirement is added to uprobe_register(). > > Link: http://lkml.kernel.org/r/CAELBmZB2XX=qEOLAdvGG4cPx4GEntcSnWQquJLUK1ongRj35cA@mail.gmail.com > Cc: Steven Rostedt > Cc: Ingo Molnar > Cc: Howard McLauchlan > Cc: Josef Bacik > Cc: Srikar Dronamraju > Cc: Miklos Szeredi > Signed-off-by: Song Liu Acked-by: Miklos Szeredi