Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp191538lfo; Tue, 17 May 2022 21:53:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQ7ssMi/Bnj1Dx3Z37Acz/FlimX9tG4smREvU4zIpsZnMnje4g2/1Hb7o1t8NaWYAXedmH X-Received: by 2002:a17:90b:19c8:b0:1df:2b09:ce99 with SMTP id nm8-20020a17090b19c800b001df2b09ce99mr18998798pjb.185.1652849598320; Tue, 17 May 2022 21:53:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652849598; cv=none; d=google.com; s=arc-20160816; b=P0dcsZ02hNtLldiZm7i1+bX5YgAfBOmLJW72V6dq19lgaJyyoRHJkyPlU091da6lVB vAR/VCVa3d+i6gghEAdb1BxF7uFlPQXnpZbB14bk4DAf5tSv/5Q+pYP0IDTPhjq6bUZK 1dcH8jBhZ1QFcb9M/PLeVc7ImevMpJZersfxIdkiXqMP7Vrb4o3mkj6FRq78iYaTqEzx /b7IKSbu2vAGUzQOzHoHXIVKjRW1ge8hdGyirzGYZBRVrcnJF/zGDL7+P6QT3xvZM99D sTkwHzP142k+9G5dvje755oZKuYT4og97ISOlzXhRiDBZUwpzSx832OtGXYx54/WYVJ0 P9Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=xNnxAHcC3RUWM23wBpMAK8Y3L4EOTebAASEZluO85cE=; b=p5gbQXHDrp3HqtAKsiK6RC4ZgzSb/Gum6/Xw2omdWzHqqdnq2oCxagDkGNdQqUZDol Xo7N6G5Pnv4I/Tb+DElT+GkpTu5JvgwIY+X6wh20KLl5a6T0LF3zOYubx+sXp5jaqljk A2pzpifXQfISkvhqS+e3vLAmgR+NRai9Cs3DmNIgfSY3URYGDG6I1gg/BP+5Tk22kAww t0DfCR0eA750SwyEungzpLhH5Iu6otoPf7kYnIcateMUnmF6isgbYMwnxbdPGTRuNSan YiaRqDERZPnw5VUiDdkxjqfa8QmaGzbd7IosPSzx1apz85Ry/o4KXgdGkx056f/W0poS uRxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b="k2hnY/ui"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id n5-20020a632705000000b003dae95430c8si1115892pgn.866.2022.05.17.21.53.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 21:53:18 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b="k2hnY/ui"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6788813C1DD; Tue, 17 May 2022 21:02:41 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233637AbiERBcU (ORCPT + 99 others); Tue, 17 May 2022 21:32:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233644AbiERBcS (ORCPT ); Tue, 17 May 2022 21:32:18 -0400 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ACA735858 for ; Tue, 17 May 2022 18:32:17 -0700 (PDT) Received: by mail-pg1-x52a.google.com with SMTP id h186so805533pgc.3 for ; Tue, 17 May 2022 18:32:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20210112.gappssmtp.com; s=20210112; h=from:to:cc:in-reply-to:references:subject:message-id:date :mime-version:content-transfer-encoding; bh=xNnxAHcC3RUWM23wBpMAK8Y3L4EOTebAASEZluO85cE=; b=k2hnY/uiyT6WSSX6lxbaW0qn5bcT12bgoL8VXXked6tMGBGzLgQJs7Oe7Ys2h5K7Xf YEszS+nJLBhHDEwuXYcLnFJzch8DPZjWPY9KpBzu6Koq7N/fI8jXZQ79Qn8byopnFSmF 1n2nhjhBwPqGgZjKgZYdpYRz1zPMlZwSvDmrXFXrhnDDPUQKtieYV2cOV7bGifIpJEez +pENNh/hdzYuWIFMlS/432DXZoE+hoqz+NKM2fEFmmAvZ6e98hrtoQYalbDp5llI91p1 aOt8wgtCo/kWgg6DOOSx6Yw7WdvNHHC9bPkFPK9qa4B6H4POMyPPmkgIEuNtxlrisPLQ fAqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:in-reply-to:references:subject :message-id:date:mime-version:content-transfer-encoding; bh=xNnxAHcC3RUWM23wBpMAK8Y3L4EOTebAASEZluO85cE=; b=2TXEgOBTQBms/N58CNtd0apCktEsYy6olp4yp4Z+DLvCQFvnxbIL+sFiHVQ0EaqAFj BGa4z6vPIwpBBpJtfoWsgD7EtWUYi/M9DjMj9HhlP8bTSP2F4ljBNq4W5IQGu6bFADjx 2l0myUIpmO8tY2WP1QlRMDqh1Tm0OuzV6Zb4z36Erl+6se5nG3KDJoIujKpQqoZ7TjMD POOQWgzoHYKl3dWFojPkzl5Y1CIT1DEH0smOPMPG177L8AFYuIldXrL2HpKUC1qKZlgW 8k8+DA4/+N+5FZUrfR3wKz8+R5RDdkO4hsh01maoRIHaj3y811SLLM2GsRYVbMEJsHQs weYQ== X-Gm-Message-State: AOAM533E5xZ4czgp3vormCdhVO957mhiNjol9T2g81lN2ym+Vrh34iRU vxGj8UxzRMeoS6KHTO66OKESji5C9iBR9w== X-Received: by 2002:a63:dd14:0:b0:3d8:204c:2f29 with SMTP id t20-20020a63dd14000000b003d8204c2f29mr21542866pgg.512.1652837536250; Tue, 17 May 2022 18:32:16 -0700 (PDT) Received: from [127.0.1.1] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id 20-20020a170902ee5400b00161946a7104sm253558plo.86.2022.05.17.18.32.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 18:32:15 -0700 (PDT) From: Jens Axboe To: tj@kernel.org, qiulaibin@huawei.com Cc: cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20220301123919.2381579-1-qiulaibin@huawei.com> References: <20220301123919.2381579-1-qiulaibin@huawei.com> Subject: Re: [PATCH -next v2] blk-throttle: Set BIO_THROTTLED when bio has been throttled Message-Id: <165283753506.124778.6326413719734024023.b4-ty@kernel.dk> Date: Tue, 17 May 2022 19:32:15 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 1 Mar 2022 20:39:19 +0800, Laibin Qiu wrote: > 1.In current process, all bio will set the BIO_THROTTLED flag > after __blk_throtl_bio(). > > 2.If bio needs to be throttled, it will start the timer and > stop submit bio directly. Bio will submit in > blk_throtl_dispatch_work_fn() when the timer expires.But in > the current process, if bio is throttled. The BIO_THROTTLED > will be set to bio after timer start. If the bio has been > completed, it may cause use-after-free blow. > > [...] Applied, thanks! [1/1] blk-throttle: Set BIO_THROTTLED when bio has been throttled commit: 5a011f889b4832aa80c2a872a5aade5c48d2756f Best regards, -- Jens Axboe