Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp31675790rwd; Fri, 7 Jul 2023 02:51:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlHUaIu989tJLX1eRYxelaFwlWYyHTYC5Va42HVGCvxpB6Nty1YvxN1BDsm+0gQYXvXliJg0 X-Received: by 2002:a05:6870:3052:b0:1b0:4219:6b5b with SMTP id u18-20020a056870305200b001b042196b5bmr5685062oau.40.1688723495936; Fri, 07 Jul 2023 02:51:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688723495; cv=none; d=google.com; s=arc-20160816; b=hQ30GZ8iGQU+0mdyb7JbZMCr1miOGinv1LI+XHhOEXZQ2fgN9ipn5P0Dij2rEsGcyP xyr8m+0DbpDow+82EZtq7s9twjsZHNnVUx8gxn28g9vAnGO8rQKg+PwwhaFN706dYbjI 4MrYIGABlTFKWDweDkuMtDOfi6NOud9iuhrTo0C2GKb0kDDdBtJ+7lwt6gbcYh1wIVTq IGxFTKWTDF6ga2SUy8nya/xpUismvVMlzZOmoC4Ex3dC3AEFLyveD+aiSIHOcViyK9Uz ZofgEHGmvsfbQk0egIyf7zH/k8CfoooZCmDAMNQH8zXX8GDIqJY1xMOdnES/IUBg/J5R 6VnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=czqFgXliG1FA9d4pxm7OKoEz+1+tRHedV30qAN9yvDY=; fh=gokLmFOxrdd/oNyi4+MmYe+xz86o10sJIgVofTOCyhQ=; b=zoA6qY4lgibvnKgYdn2WE8oZj67herGzd7cQXHyyPiTFL2DCtXjy0gBTHJHaHFh5a2 UTKW961NS7A1lCMT2pgZ5wmSfXYX5asy2M+r+MZi8A5JXsi7tgftGnxulF26UylfNgxz Fon/Z1T/OkR/bUuqtiYgJa4ShUo7t2aZoy61ruiaAzfx/exBspN+oqwMVn9wGYWUcn4d o4bKmdVulVy9Ra8MWZAVGOd4iy2+zYKCBkO58FAYXslBU5Mmw7xi/KrVbsdowQEz0elv Ps+w4bAR2gtaCBMv6LLaxtHGMO6KD9IE4acrJsCvmDJZI8/GdaCfmKIOkUKV62TkeIYa xWAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lnqBvV0Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o20-20020a17090b0c9400b00263b9233a57si1632156pjz.64.2023.07.07.02.51.23; Fri, 07 Jul 2023 02:51:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lnqBvV0Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232729AbjGGJhN (ORCPT + 99 others); Fri, 7 Jul 2023 05:37:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232671AbjGGJhL (ORCPT ); Fri, 7 Jul 2023 05:37:11 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DB582105; Fri, 7 Jul 2023 02:37:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0C445618DF; Fri, 7 Jul 2023 09:37:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6375FC433D9; Fri, 7 Jul 2023 09:37:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688722629; bh=LiQDwPwTkBNAq6Qw/pxa2ZzWigHnaTtJLG4PuMYRTg0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=lnqBvV0Y4ozrI0ckSNZOieXkU5tXT/O0IgcmbC6SqEPn17zehD74nBDRLuRmzwf7B oah8TIlh9bYSwcRN/+V+kBqdOIW6nSnCT3khroTAc2PQzeWrT+6wqsKl7snZn9KlcC LdwnvJLlZOLs5FkebVBmiXheGDk3YjbNLLi8fX2vJtDc1dW/510ZMWvc7ZJFV+6T3M JkbpHfwMKK+CgH2kPuJIbp82RmX4So+jzK/zIewoPsQugMk+RCyx+Qo8U9BKugjf5u wMVYEENf7L1irZ6rFBFNVQXzfuny0qI+YZ8jMtV/oXN1z3y9r0TdJSotWHXCxa6Hta V32Qg9tu0w27A== Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-4fb8574a3a1so2500756e87.1; Fri, 07 Jul 2023 02:37:09 -0700 (PDT) X-Gm-Message-State: ABy/qLY70ugQF/GoPeb9QhU84K9x3Vw8x3Z57ARWpww81oxnoBZtl/xc J38in1aEE7+oYzginvDmKOKB5o/T3JVg399dwNk= X-Received: by 2002:a05:6512:3a82:b0:4f9:cd02:4af1 with SMTP id q2-20020a0565123a8200b004f9cd024af1mr3851999lfu.34.1688722627389; Fri, 07 Jul 2023 02:37:07 -0700 (PDT) MIME-Version: 1.0 References: <20230628010756.70649-1-yukuai1@huaweicloud.com> <20230628010756.70649-3-yukuai1@huaweicloud.com> <4690dfff-ad72-bf83-7feb-75018712eb17@huaweicloud.com> In-Reply-To: From: Song Liu Date: Fri, 7 Jul 2023 17:36:54 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH -next v2 2/2] md/raid5-cache: fix null-ptr-deref in r5l_reclaim_thread() To: Yu Kuai Cc: xni@redhat.com, logang@deltatee.com, hch@lst.de, shli@fb.com, linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, yi.zhang@huawei.com, yangerkun@huawwe.com, "yukuai (C)" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Fri, Jul 7, 2023 at 5:19=E2=80=AFPM Yu Kuai wr= ote: > > Hi, > > =E5=9C=A8 2023/07/07 17:16, Yu Kuai =E5=86=99=E9=81=93: > > Perhaps you means this order? > > > > r5l_exit_log > > flush_work(&log->disable_writeback_work) > > conf->log =3D NULL > > md_unregister_thread(&log->reclaim_thread) > > > > I think this is better indeed. > Never mind, this is wrong, I got confused... > > Please ignore this and take a look at my original fix. How about r5l_exit_log md_unregister_thread(&log->reclaim_thread) conf->log =3D NULL flush_work(&log->disable_writeback_work) ? Thanks, Song