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=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT 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 1C349C4321D for ; Thu, 23 Aug 2018 15:16:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CF3E32064A for ; Thu, 23 Aug 2018 15:16:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CF3E32064A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733009AbeHWSqG (ORCPT ); Thu, 23 Aug 2018 14:46:06 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:60360 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728967AbeHWSqG (ORCPT ); Thu, 23 Aug 2018 14:46:06 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AFAAA4021FC2; Thu, 23 Aug 2018 15:15:59 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.34.27.30]) by smtp.corp.redhat.com (Postfix) with SMTP id 011C7A9EB5; Thu, 23 Aug 2018 15:15:55 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Thu, 23 Aug 2018 17:15:59 +0200 (CEST) Date: Thu, 23 Aug 2018 17:15:55 +0200 From: Oleg Nesterov To: Srikar Dronamraju Cc: Vlastimil Babka , Yang Shi , mhocko@kernel.org, willy@infradead.org, ldufour@linux.vnet.ibm.com, kirill@shutemov.name, akpm@linux-foundation.org, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, linux-mm@kvack.org, liu.song.a23@gmail.com, ravi.bangoria@linux.ibm.com, linux-kernel@vger.kernel.org Subject: Re: [RFC v8 PATCH 2/5] uprobes: introduce has_uprobes helper Message-ID: <20180823151554.GC10652@redhat.com> References: <1534358990-85530-1-git-send-email-yang.shi@linux.alibaba.com> <1534358990-85530-3-git-send-email-yang.shi@linux.alibaba.com> <20180822150718.GB52756@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180822150718.GB52756@linux.vnet.ibm.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Thu, 23 Aug 2018 15:15:59 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Thu, 23 Aug 2018 15:15:59 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'oleg@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/22, Srikar Dronamraju wrote: > > * Vlastimil Babka [2018-08-22 12:55:59]: > > > On 08/15/2018 08:49 PM, Yang Shi wrote: > > > We need check if mm or vma has uprobes in the following patch to check > > > if a vma could be unmapped with holding read mmap_sem. Confused... why can't we call uprobe_munmap() under read_lock(mmap_sem) ? OK, it can race with find_active_uprobe() but I do not see anything really wrong, and a false-positive MMF_RECALC_UPROBES is fine. Again, I think we should simply kill uprobe_munmap(), but this needs another discussion. Oleg.