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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 ADF5EC433E2 for ; Wed, 9 Sep 2020 18:30:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 75CD221D40 for ; Wed, 9 Sep 2020 18:30:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20150623.gappssmtp.com header.i=@kernel-dk.20150623.gappssmtp.com header.b="Aai15vFl" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728442AbgIISat (ORCPT ); Wed, 9 Sep 2020 14:30:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727113AbgIISas (ORCPT ); Wed, 9 Sep 2020 14:30:48 -0400 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE623C061756 for ; Wed, 9 Sep 2020 11:30:47 -0700 (PDT) Received: by mail-io1-xd43.google.com with SMTP id h4so4259918ioe.5 for ; Wed, 09 Sep 2020 11:30:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=98xyvtYgbwa5J67c7RkI6GnQwliGFXe74W0JhOQBOmc=; b=Aai15vFl3dYqGw9K5b3xK4POAF5zorYpaKKRyIxIZqV4MkjapQJdc5WoBCxIdDvoQe 7FdlRAedwzY1qpqwlJ5d+oVkEoZFtbyilOo5PeMvP4vfl//XjFD28AIWbmbRXihnb49x JbVoj7qo0eWkzJVqnZ3EfR9rqCRwG9dCMJoxkLi4ToOLHhfZC3SzjOM+82YB9SjmG1R5 a33hxHQK4Io4do/ldHL0Nwp+Us6ESgUxv94eNJDwEE8kOAIZj98CWh42I5BQfrPOtm/D GfnSrPywZHKaSWgiqluDNEtHluhP8WGr1YnzmI21OdCOYBTano9T1NdzUMKvE3YznXEE +6HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=98xyvtYgbwa5J67c7RkI6GnQwliGFXe74W0JhOQBOmc=; b=E5+881qmMdVwx03hLGQ7bjbLke44pLiELjl9D0pZAlxJTMObtQ/OQ8zruy0sMXv/8y i8fOyxLR3DXx1OddM62F+WDedTGF6D/l6+QxuYKrxb4OHJRBbRauBTj3l3uM+PE+Cjyx y61q6Rgs/sM8pw0xq4gxeEo8QF9oIGJmcMzOvoNegmq6m45AIJK1FqKqfSZuswM1jOly Xvvi2sUKVbnXUVn3X+pJMm4JuxDJPyxzAtamC/7asj6wOzHtYwyBs9YtePwg/X2/teXt oVeBil8ajNqZEZv/h9417xOYkL/KXcYsBo3ajOLNxFuLcNxca+6/UpYjvj2QPISal6gl 06EQ== X-Gm-Message-State: AOAM530oDPBOihPqBabz6/YqJtyALThLjliv10RTQnH3pTIdO3Vxk471 RsfSuPrvH4Hld9Wy0RulxZf8ijbH4o5YXaEd X-Google-Smtp-Source: ABdhPJzDQCDM7qsjK2rY35N17lqTgsC2hAs5QECTlf9biMd54YdHkaHJRtjNBTH3FQACUVf86OCMNw== X-Received: by 2002:a05:6602:2f88:: with SMTP id u8mr4410307iow.175.1599676246841; Wed, 09 Sep 2020 11:30:46 -0700 (PDT) Received: from [192.168.1.10] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id u9sm1501725iow.26.2020.09.09.11.30.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Sep 2020 11:30:46 -0700 (PDT) Subject: Re: [PATCH for-next] io_uring: fix ctx refcounting in io_uring_enter() To: Stefano Garzarella Cc: Alexander Viro , io-uring@vger.kernel.org, Kees Cook , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org References: <20200909151900.60321-1-sgarzare@redhat.com> From: Jens Axboe Message-ID: <9080c3fa-a726-b664-f634-0ea7dfda80e0@kernel.dk> Date: Wed, 9 Sep 2020 12:30:45 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200909151900.60321-1-sgarzare@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On 9/9/20 9:19 AM, Stefano Garzarella wrote: > If the ring is disabled we don't decrease the 'ctx' refcount since > we wrongly jump to 'out_fput' label. > > Instead let's jump to 'out' label where we decrease the 'ctx' refcount. Applied, thanks. -- Jens Axboe