From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) by mail19.linbit.com (LINBIT Mail Daemon) with ESMTP id 86CE116095D for ; Tue, 8 Jul 2025 20:00:17 +0200 (CEST) Received: by mail-io1-f41.google.com with SMTP id ca18e2360f4ac-875ce3c8e24so170593539f.1 for ; Tue, 08 Jul 2025 11:00:16 -0700 (PDT) From: Jens Axboe To: =?utf-8?q?Christoph_B=C3=B6hmwalder?= In-Reply-To: <20250627095728.800688-1-christoph.boehmwalder@linbit.com> References: <20250627095728.800688-1-christoph.boehmwalder@linbit.com> Subject: Re: [PATCH] drbd: add missing kref_get in handle_write_conflicts Message-Id: <175199761446.1185853.16712742207654241158.b4-ty@kernel.dk> Date: Tue, 08 Jul 2025 12:00:14 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Cc: Lars Ellenberg , Philipp Reisner , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Sarah Newman , Lars Ellenberg , drbd-dev@lists.linbit.com List-Id: "*Coordination* of development, patches, contributions -- *Questions* \(even to developers\) go to drbd-user, please." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, 27 Jun 2025 11:57:28 +0200, Christoph Böhmwalder wrote: > With `two-primaries` enabled, DRBD tries to detect "concurrent" writes > and handle write conflicts, so that even if you write to the same sector > simultaneously on both nodes, they end up with the identical data once > the writes are completed. > > In handling "superseeded" writes, we forgot a kref_get, > resulting in a premature drbd_destroy_device and use after free, > and further to kernel crashes with symptoms. > > [...] Applied, thanks! [1/1] drbd: add missing kref_get in handle_write_conflicts commit: 00c9c9628b49e368d140cfa61d7df9b8922ec2a8 Best regards, -- Jens Axboe