From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) (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 436903128CC for ; Thu, 23 Apr 2026 18:21:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776968483; cv=none; b=RPrWgGoqo9Jy4Qf1IK4vZQeaPqDWE/d/gqRAMbd3nMWrSULnlScjQlv5hxW7VI3IHL2GdZ0imescWktPe8jCTGlW6qqzI5TvWakSIxf07eVDIsRD1/MyqMsBzOt4C7i55/RQsmtD+4apHhGb/T7YE3qnPLS2EXsE98v+SzUaL2E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776968483; c=relaxed/simple; bh=4fytxzqqonlQHTndOTwyebJ2k82842gKNoyfGqKVHSQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Si9RryHXP+66gXh3DOSR3qlFkcy+vpKD05Or21xIdHMtZW84rXJDqV9xxXrQDWIx/dS9KTQACIAMx29MNtuk8YWzuhcnHYN9WbBM+aivI/8O9d9t+lSh0E8wepz5v2ycRmNbZwa5MsduljMiNeegOWgcgc2ckM+B7tz9Z8V7+Dk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=soleen.com; spf=pass smtp.mailfrom=soleen.com; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b=Vl3hxvgO; arc=none smtp.client-ip=209.85.160.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=soleen.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=soleen.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b="Vl3hxvgO" Received: by mail-qt1-f180.google.com with SMTP id d75a77b69052e-5062fc5d86aso57015841cf.1 for ; Thu, 23 Apr 2026 11:21:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1776968481; x=1777573281; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=3mZK0VzWCP9lVGMi3NqX/17ib5QD0/zfXtZAUxk+xLA=; b=Vl3hxvgOhcOztAasAlq3TUqub5fXsLkf/jse5x7c27W+KI20G5mo2+T2to7AYL6rOx UUgG6klQyRG8iCzKPUO4fRNPWj08hMrtdv9dX+NhNDYfjHF0ucY+EkyDYwuhh1qEaBmN F5KZinX5egcE8F1Uw4IFJRQT3E4NezxiCUIi+YNKEr1d0Jtos5LI+05+PFmhdu9thpkK 1CMD9kO8qwd4spVx1EDcHt4t/qciKPpyDJMj6VrpJSj5O2fKofl0Mku0ZSMLvzEdeIZ8 flZE+T6nZi3WVbRSTu/YTKF+KhlmOPLW3GBdWjTG49kjPME21wTgZhM5/WvUHp2HVxh6 55qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776968481; x=1777573281; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3mZK0VzWCP9lVGMi3NqX/17ib5QD0/zfXtZAUxk+xLA=; b=Cm2fp6nvOE6XAD5WhVWDP78st2ZLdNoTtH0RZmeKrleEa5vGOxc20NhLP58Wnp4G4C bB7ViLJkqSi9jCwxcy4FrVjM43BcTLPqh6Ejjt9Z1V2c+C6D+pSgO61CKWVI9W0SmCUb XBBOMDySpv5Uo1lQQlTUB2xgt5n97UD59z4cBOzYBmm3tX9zn9yxeJWQcia1fRalLNRF UKumX7kyLDfEv9zcBkx/enuaZy7Jg0exnTm15QFefz3OObFZHDMyku1GzEpfqj12vQeY ltltdObcqquJqo/Z1vTzqQdmgDVHIsstlIHdi1EznJz6iS+GVbyTJes81OxMEMgnCn95 J+uQ== X-Gm-Message-State: AOJu0YxMj4DObjmZwrvvsd1QvSzNN68VibIQEFN5iXw6834CkB16EjFf U0+zNnR9KJhzJiHdopR2TD7ub62SpLvrTltRnnBLnq3zBYb7UZv4TYjcV/SHtjM9OVE= X-Gm-Gg: AeBDiev65zc4WE86yVJhnJLq05y9DTxUbBjuod8/I1aFvcQxfHPtVE3Ldu9VQFTJ9k+ eCQZAktqoSI7oKsgdtem6Zb/QeoMs38zu4EkPDWR95HpFTxkn6PuUEFTBwZS+xwc2Dh4y3JSTru 5wq1nFVRf3ikPhpM+DHzFuy0qunJnMMoTdAG/P/8xvDPDVMuZ5NLn9znZ2PTo4CbErHvI6wrbIb VkvSPokMxvHAyah2RuT9LvVk0Qglig36qDuA/7MyT78WpbhTW6ltRX06Nn9izTsRj/ZTzi1ING4 vkrnHNHBLSBIRhXUTq6zPt8OWvipEsnxLv0sQZgQ9nz2zpfzDDBDBilepSVwFIeUAUCCH5Q7JuM w413gXf5oFKPTQYQf/D5Z+8TQdjL+C5+1ybRBHnuZHm712eYXkadvVyn72W9lXOL2K7xln9lIMg qRmc5APEdO7AIn7gfTGyeB+/1/zkOcx8GpOfrM4+2zHw/RmEa9mEfmOoERkcWv/g== X-Received: by 2002:a05:622a:5e16:b0:50f:c36a:3821 with SMTP id d75a77b69052e-50fc36a3c68mr117319851cf.34.1776968480917; Thu, 23 Apr 2026 11:21:20 -0700 (PDT) Received: from plex ([71.181.43.54]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8b02ac72915sm166834826d6.15.2026.04.23.11.21.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Apr 2026 11:21:20 -0700 (PDT) Date: Thu, 23 Apr 2026 18:21:19 +0000 From: Pasha Tatashin To: David Matlack Cc: linux-kernel@vger.kernel.org, Andrew Morton , Mike Rapoport , Pasha Tatashin , Pratyush Yadav , Samiullah Khawaja Subject: Re: [PATCH 2/2] liveupdate: Reference count incoming FLB data Message-ID: References: <20260423174032.3140399-1-dmatlack@google.com> <20260423174032.3140399-3-dmatlack@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260423174032.3140399-3-dmatlack@google.com> On 04-23 17:40, David Matlack wrote: > Increment the incoming FLB refcount in liveupdate_flb_get_incoming() so > that the FLB structure cannot be freed while the caller is actively using > it. Add an additional liveupdate_flb_put_incoming() function so the > caller can explicitly indicate when it is done using the FLB data. > > During a Live Update, a subsystem might need to hold onto the incoming > File-Lifecycle-Bound (FLB) data for an extended period, such as during > device enumeration. Incrementing the reference count guarantees that the > data remains valid and accessible until the subsystem releases it, > preventing future use-after-free bugs. > > Fixes: cab056f2aae7 ("liveupdate: luo_flb: introduce File-Lifecycle-Bound global state") > Signed-off-by: David Matlack Reviewed-by: Pasha Tatashin Thanks! Pasha