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=-8.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 14C75C4361A for ; Fri, 4 Dec 2020 01:58:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C1FD722509 for ; Fri, 4 Dec 2020 01:58:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726414AbgLDB5w (ORCPT ); Thu, 3 Dec 2020 20:57:52 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:27802 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725885AbgLDB5w (ORCPT ); Thu, 3 Dec 2020 20:57:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607046986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AF4gEX/vocn6ADKGRD/a87GO0jg5J5yO20C1aSjch7U=; b=QPzUPtwFwFzxKI0RBVJEd/NREsPxOY111xbbLPNhvPm3GEIjAfYzOzwDW2v+R+vnRFQBlC FV0A00wupcow0ipqL+CNnbDKxhoisRodEAdRS/yxhkAPlgq9xdJCVVqRPu+kFmJMh8sYiV 7UQ859iCCFToi5e9daNQPp8xsyD2u6I= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-210-uxkl4M0IONqi5co7ssqmCA-1; Thu, 03 Dec 2020 20:56:24 -0500 X-MC-Unique: uxkl4M0IONqi5co7ssqmCA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D2140180A086; Fri, 4 Dec 2020 01:56:21 +0000 (UTC) Received: from llong.remote.csb (ovpn-117-98.rdu2.redhat.com [10.10.117.98]) by smtp.corp.redhat.com (Postfix) with ESMTP id 406EB620D7; Fri, 4 Dec 2020 01:56:16 +0000 (UTC) Subject: Re: [PATCH 0/3] exec: Transform exec_update_mutex into a rw_semaphore To: Linus Torvalds , "Eric W. Biederman" , Davidlohr Bueso Cc: Linux Kernel Mailing List , Peter Zijlstra , Ingo Molnar , Will Deacon , Jann Horn , Vasiliy Kulikov , Al Viro , Bernd Edlinger , Oleg Nesterov , Christopher Yeoh , Cyrill Gorcunov , Sargun Dhillon , Christian Brauner , Arnd Bergmann , Arnaldo Carvalho de Melo References: <87tut2bqik.fsf@x220.int.ebiederm.org> From: Waiman Long Organization: Red Hat Message-ID: <874ffe6a-628f-e504-037f-ec321565a40c@redhat.com> Date: Thu, 3 Dec 2020 20:56:15 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/3/20 5:42 PM, Linus Torvalds wrote: > On Thu, Dec 3, 2020 at 12:10 PM Eric W. Biederman wrote: >> The simplest and most robust solution appears to be making >> exec_update_mutex a read/write lock and having everything execept for >> exec take the lock for read. > Looks sane to me. > > I'd like the locking people to look at the down_read_*() functions, > even if they look simple. Adding Waiman and Davidlohr to the cc just > in case they would look at that too, since they've worked on that > code. I have looked at patches 1 & 2 on adding down_read_killable_nested() and down_read_interruptible(). They looks good to me. Cheers, Longman