Received: by 10.192.165.148 with SMTP id m20csp2120111imm; Thu, 26 Apr 2018 06:27:42 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+gPFIAP6cDH5bCs/ipIOlOJUuNdTOWO+YaFCWFg+ouem3DWjn51aJEVypQZR9bNUzn61KX X-Received: by 2002:a17:902:8a:: with SMTP id a10-v6mr31828636pla.89.1524749262919; Thu, 26 Apr 2018 06:27:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524749262; cv=none; d=google.com; s=arc-20160816; b=DCymnLcnDMq29LhKTstY4StUPpo/r9heNBzJsy55nrUXoELbqkuV4hkx1/JXX2rWU7 TjkWoodoZ9pUgaTDGXxSGGfpYuY8hZ0SplzM+itjZ5LzopjXJ3A2F0tCtVZWbPSEeocb FvZux57yKW2S6sdW6ifIyYjxOBMHjw3rc8XR1IHT1D25Mz0pia6AJ48WBVqQ9oe9TmnR zZz2ENgisOmOue0cKfNF3SPNhUUYKz8Unh2xrJ+ompmsG4JhAxqeyYooagc4ZYaGGLug wwdiUyIA777ZEpTx59APnY5DM/APKLqIg08Kuwpsy8xbZZ2aPL6vgsYGpkBDzzrRgPtU uKkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=njiQbMVWIfdhxKVSCXML3plNYjoO7imlBHeWEy5sPmI=; b=a3krbaEkaFGMaQY234hjD7cGxM7/1rVGOfJ2kXZnaOcwPIrgMVMY4HmSI3gY74LCs2 4gkqH+u8jOHfhIyZArpv4uIGyszBJX2xqiM9urVlirvzvXZ/Qxzprclse3CtUGCu1DzR l1BWBRbDac60KDrm7gyjL2libiDRW4cnKszBlSFeTbbnUUYDgOgf05tbG8FfSwvswecW 4mcMGEh88GIMSAqCAWGDbMXnsOdv+7jBOuyrD5DtcZerbD3bbb1h3N9Mwtw0hFRA7VKj l760wYUXdtKHrJrgpryrqy+6RuZvOehafnu35Ww4xJEjuBJQ/Hy9bup+MWsC35KDGq+o GDGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=mfsa11cg; 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 n7si15695911pga.543.2018.04.26.06.27.28; Thu, 26 Apr 2018 06:27: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=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=mfsa11cg; 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 S1756209AbeDZNZ4 (ORCPT + 99 others); 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 Received: by mail-ot0-f196.google.com with SMTP id j27-v6so29222300ota.5 for ; Thu, 26 Apr 2018 06:25:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=njiQbMVWIfdhxKVSCXML3plNYjoO7imlBHeWEy5sPmI=; b=mfsa11cgbK0hdthHtl9DzqHGMyGMPjzFNSD2BIjZO2oL33h2xBJEcA9CZQTGflrkgk CkaFGgO1yPW43LA51L12Uoa5GtEo/iysOF29sIn9PYpeQ0R+3tQ9itSsTl8l5o5+SiFJ FUqh3qOQWJM7KAHZlfaUpjXhqM87JvL0J+KKA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=njiQbMVWIfdhxKVSCXML3plNYjoO7imlBHeWEy5sPmI=; b=TSF5hlp9IsNi1vXC0u4MKKCX9lneflhkfz1G1cb39pHfHCgLo2UXoULBEBILm/k3cx /33ctDgEWZno7c3bvmZH5gU2sg2WxNBn58axLK2ykvxDrWplDs17gHhr3jJFv0D5jTLB JBpnRlnNp1MbTW9LCNfmU0UsyB9KdXh5i79nHzogQCWSVVde5OLopnM8fz9MeI87udyi 8e243oJ1P9WkT0V7tVRixwD5sjjIUWEK2CdR51vBL6xN50zjlLziXsF8RgiYysw5ZkYn evKat86vAb+SYjbUjcpXGXYXr2SstJSTjeUnG09RjZ7NbhwUC235g/mupDtE9qhfZ8F8 Kvsg== X-Gm-Message-State: ALQs6tAQgbZWL0/SNmHAkz0ybDmB2j/SZd7yGNzgX8IiiPXOb5kA9SMu O4pvNQUBkONe9x6Bv8A7z1F018fDwPqUoT0W4xnrow== X-Received: by 2002:a9d:1535:: with SMTP id u50-v6mr23940085otf.197.1524749153803; Thu, 26 Apr 2018 06:25:53 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:5303:0:0:0:0:0 with HTTP; Thu, 26 Apr 2018 06:25:53 -0700 (PDT) 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 Precedence: bulk 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