From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com [209.85.210.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A0E335BDDB for ; Wed, 24 Jun 2026 04:41:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782276081; cv=none; b=rUbmDXKkGY6NF/VhGFnWaLTWqqDKs5OgH9TGTTQz0+ZWeDSXVIvBR2k4dXkm8RXwUnSpiKmml7cSZ7mjmNW9UP46N26HoDJ+cZ17rDqIaEFp0G/PkWs033lmH52lIr1fpxbsZYfZKKS6k3I8g248AZDmpjiKSsvRyR/QnHAmeG0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782276081; c=relaxed/simple; bh=HLVy3TH9ZBdUC9IImCHUkld1iGj1Bi82eoMFoRdb5ZQ=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:From:To:Cc: References:In-Reply-To; b=jtt0xzxOuGsyj/wfVoUk+aPguQvcjjIoM9y59utH5hMNTliMNjfSKBcPjO/m5I88Kx7bj/HKYzJSpPnR/T4H+D1WFZOt6GzmqNjkpiLu5uKmzb/i2acFH5jWaHUhBB0H6eOE/sufYim37iFD21AZX/Wh3f9fOSHjpTJu9CvHhgs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=brighamcampbell.com; spf=pass smtp.mailfrom=brighamcampbell.com; dkim=pass (2048-bit key) header.d=brighamcampbell.com header.i=@brighamcampbell.com header.b=dFdW+1KB; arc=none smtp.client-ip=209.85.210.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=brighamcampbell.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=brighamcampbell.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=brighamcampbell.com header.i=@brighamcampbell.com header.b="dFdW+1KB" Received: by mail-ot1-f50.google.com with SMTP id 46e09a7af769-7e93f93ed01so464814a34.3 for ; Tue, 23 Jun 2026 21:41:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brighamcampbell.com; s=google; t=1782276079; x=1782880879; darn=vger.kernel.org; h=in-reply-to:references:cc:to:from:subject:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=HLVy3TH9ZBdUC9IImCHUkld1iGj1Bi82eoMFoRdb5ZQ=; b=dFdW+1KBYGjXfylBMsWb0NFdBjvzcNg3F1lAnM6D9EBrnEHkDGJ9iQXiLimgvmztRt cq5yv5ICYjIe0QBXgZg7yPbT7/Mp3mGNWPKV4S1VR5bTLlLsIjoSWSQd1Q8H9WqHTTBZ TN3dErlJW0rCdrg1utmYkqxUkso8DkxfHscLTdbXrdlPqS6mk+GbPQsVBAmPm0SJlTdL NogSLv2skFm/bz9Uh2fU6WnterWssxngIkrAGZfAO1HYuLgliL683TAMuxYLf5NYuaoK WAyeCzxX+V2uYDfGVIupSS/VKvJCcVT2EJaaLK95G3vT62IDSlgvX3o3sBFwZDhBc5J2 EKuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782276079; x=1782880879; h=in-reply-to:references:cc:to:from:subject:message-id:date :content-transfer-encoding:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=HLVy3TH9ZBdUC9IImCHUkld1iGj1Bi82eoMFoRdb5ZQ=; b=I54CzW/Lrk9GHEv0dBt3Bq64TDNZScfKQGLLpkG2RUs/jMh6K9YJ74BJtoMzpuX6K4 mkLdPxaOdEBd97qzi0qvOp89hdaCoy7u9uZVLTgpuj8YQFzfUeKcY09hUzakBU+G19Q1 0lzLpbL86VBq2J2pLZJRPC6usXl8XiaP0lJuSbr34BsgT3+7+TJDtpKFQk6aymhnVzeZ o8UFmvU4e3uwYgFO5VAXLM9P1vHku1AYfzHc9IwTkE5lgbc7MYAuDLAP94cEY1BfKieo QFGAOmve1sH5vpws04ArC2D77l7+neO2qD4ENDcMIG1mWNGSSi9fj2L1pulu5vIkeH0q dZdQ== X-Forwarded-Encrypted: i=1; AFNElJ8pxOQ/BShrLJicug6Bl7MUIbIp8c5P9Fi0t9GW5OYpVDowzSDCwotElfHnMfmKu98clKwfa22A3itm8WY=@vger.kernel.org X-Gm-Message-State: AOJu0Yx3iN0h4yckacsC82+ArZsLn13HC8c8HaogMX0AWQQjXN/3sIfE 5ZzjBZEewpY77wgwzLKh5sQid4FmVbNv+QSe/idtsmfmauMPPCQeETz1anjNiWMeUWU= X-Gm-Gg: AfdE7ckH0u5Qn90tk1cq3myuJcrrBEjGf6AqAxX6PKh8mvxqoXHXLDBEEifJrHFeUys EcX9qb3F8Plve8m3lGQjG2teulBWLbDQgK5qR35zOsvC8eFRmZKS6WXbv+RDk28sRoNMe4nFMkY IhuiyxTBXUnmRzfRrWADtZ4Ytvbg3MIuwZGlYodWMqZbWhcnZJJD2v6747ncyWmrUmkvT/Drby+ fi6xZtH+Ir/Z3Y/bo4/7MjBcaPJKeQvaAqX35DBlwn0aZaSyjHsZxHuwXQ3lRkDVq2vg6B6m4YC ZVEIwLOBoPqQ2uCVVeM2kCOomnETmwX3aj2A/wkOOBbhn/f8KPXscLnrQvTOqU9z/g+oNZWfzcJ KLL7XP29yWwYQy6eMlJ3O6y11A51qm5dsvMrfMqWxNbtfWaPiK+q+CA8GJff3wj7MqSK5zyAEUw fbI0N0QjFAPzdXGEEpQOFTznguiNa7i311OhZ3Q13ml4dJ89m3HszAUsTD1mWRQYCtFT2e X-Received: by 2002:a05:6830:6508:b0:7dd:9b19:a875 with SMTP id 46e09a7af769-7e94083e3b9mr14683547a34.2.1782276079546; Tue, 23 Jun 2026 21:41:19 -0700 (PDT) Received: from brighamcampbell.com ([2605:fb40:0:c09:9ca9:e0fd:b7cd:be76]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7e944068bb7sm10280395a34.9.2026.06.23.21.41.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jun 2026 21:41:18 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 23 Jun 2026 22:42:47 -0600 Message-Id: Subject: Re: [PATCH v2] md/raid5-ppl: fix use-after-free in ppl_do_flush() From: "Brigham Campbell" To: "Sajal Gupta" , , Cc: , , , , , , X-Mailer: aerc 0.21.0-0-g5549850facc2 References: <20260622142146.56637-1-sajal2005gupta@gmail.com> In-Reply-To: <20260622142146.56637-1-sajal2005gupta@gmail.com> On Mon Jun 22, 2026 at 8:06 AM MDT, Sajal Gupta wrote: > Compile tested only. It looks like you're on the right track, but this could use some testing. My analysis here may be incorrect, but it looks like it should be pretty easy to test this patch by compiling and running on a system with a RAID5 array, PPL enabled, and no RAID journal. I expect the call stack would look something like the following (feel free to correct me, anyone...): ppl_do_flush ppl_stripe_write_finished log_stripe_write_finished handle_stripe ... To be sure, you can add a tracepoint[^1] inside ppl_do_flush. Dan was probably reluctant to make the change himself, opting to instead submit a KTODO because the change is relatively straightforward, but testing is a little more involved. Testing is particularly important with respect to subsystems pertaining to the filesystem because latent regressions could mean permanent data loss. Cheers, Brigham [1]: https://docs.kernel.org/trace/tracepoints.html