From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=103.168.172.156 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796231170; b=xC+HPcwDrqT9zcNk9bYYNzIN2Ge7/aY1Xydd937mSgXMeE4iM4GD84iMObhFYpGSGhyc OFroZWJC2cY+E4z691BA8Vk+1hjFjs4VFfrXnC2mcRDKikM4a07DigmdK9vH8M39Yvy9o 62t4u+hGsvySWacOCzemggnZzsXyLwHoH5CXZj1yonfjTxkdYQ6p9be6kjhZTFz1MfE65 k8G+fDiNVQnhvyktminvUiRbEdzYAhB9XrvGryB9RX6XR2UNjAndLf0VMoWLNDkVSKc+h E+gad+jMKvGNHMOLqPBgfJhMRIjemRlD+AXxUN3nJuCb6tEtLMRYf4p6MfU/7NsB85A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796231170; h=DMARC-Filter:Received:Received:DKIM-Signature:DKIM-Signature: X-DKIM2-Info:DKIM2-Signature:X-DKIM2-Info:Message-Instance: X-ME-Sender:X-ME-Received:X-ME-Proxy-Cause:X-ME-Proxy:Feedback-ID: Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:Content-Transfer-Encoding: In-Reply-To; bh=aRnsoXgsmCzjDJ1TVNMTixKIIW1PAbUujEz2NihgjGk=; b=D0DhTkC4Oa5dlwyei6FR020wCGBye3VuY2dCpqpIOs8B6AR8bhuVnu98x/MpduXy42Wk duZ0dYx1QCA3Dpz9NIr0DXwDy63pbnJDEK16X3QWu15j3Jf88b2KzJG/nX6KFTdyuUIQk +RBofCDHNtML2F/2l94c6+s93godxLW2C8uhnbt1j/51URnL78qC63B6cVI4Argyf+ET5 7AUk9UuRT9vcUGinq7j9D2y0WSWq6uog0liPtY+gihhoU3Wpxxl8wKnXxjMARdnolm0QX klalfPeCCeKnJnc6iQ/0DJ+wA5BPZHt8xMH0APiSGHBiarQk1TeFFyPUAx6W+/cWfmA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=ragnatech.se; spf=pass smtp.mailfrom=ragnatech.se; dkim=pass header.d=ragnatech.se header.i=@ragnatech.se header.a=rsa-sha256 header.s=fm2 header.b=F+2OHuwc; dkim=pass header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b="v/o2Hwqf"; arc=none smtp.remote-ip=103.168.172.156 Received: from fhigh-a5-smtp.messagingengine.com (fhigh-a5-smtp.messagingengine.com [103.168.172.156]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 07325606A332 for ; Wed, 2 Dec 2026 17:06:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 07325606A332 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ragnatech.se Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ragnatech.se Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=ragnatech.se header.i=@ragnatech.se header.a=rsa-sha256 header.s=fm2 header.b=F+2OHuwc; dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=v/o2Hwqf Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id 3B85B14000FD for ; Wed, 2 Dec 2026 12:06:09 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Wed, 02 Dec 2026 12:06:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ragnatech.se; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1796231169; x=1796317569; bh=aRnsoXgsmCzjDJ1TVNMTixKIIW1PAbUujEz2NihgjGk=; b= F+2OHuwcf9RQE0ADL3FF3Z67LOGtjKrUrpN62wCMKipaPNx7BIrL4U7Mx1ABHAbf 711/AWeafs1BZLHniQ1Z5k948NISSTpZ1YnTzqu6eHuvBFaP09DhT08Alxrk5Y9I jebHTieGaBp4R16G3572LU0vwdtayss24dgoks1tmVSsQgSKONWrBwramiS817Dm QF2CCRD80QH1IxQnX+ikQObqwtdGewZBlEJ41QfPA5fHyIEmacWF3Z6nuwR/vPVf KhL+KaBZIhHIxyFQgOUec5zMkYJBbbu2MlR1doX9NP19yvZnXSbHdH1t4LOvNcLP 0ra5z7elBOMUJQRsgGS97Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1796231169; x= 1796317569; bh=aRnsoXgsmCzjDJ1TVNMTixKIIW1PAbUujEz2NihgjGk=; b=v /o2Hwqf0U08hXqukoncZBB1usHL+OVu+x0ncb7TNSLldMpeTlbeGtecYTp3ltC3J WiRcQDXVXny4gGKQeDg15+Rcu10m75w103UmhTNELsLoWmJYFd5sCmFxZjKrBuwR b4dM9alOr4GsNBqs90GWcO5+yujdKHZW5htqvGhcivxyGBWU3PQ53J7AP+EeHh6f 9YR0dalQOZM75rP4DpAP4fsZcPTED27aKcSnz8ytX7SPnUUZwMFVvoZt5xZU//ju 1YAtrdBUuTqnmsnNM5sLTfnsSMfk+m8g82Hwou12I2VqShOyGsc642bNgTocSYvb hPbbm+xGwTyeI0dxk/ngw== X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=sign d=ragnatech.se a=rsa-sha256; DKIM2-Signature: i=1; m=1; t=1796231169; d=ragnatech.se; mf=PG5pa2xhcy5zb2Rlcmx1bmRAcmFnbmF0ZWNoLnNlPg==; rt=PHN0YWJsZUB2Z2VyLmtlcm5lbC5vcmc+; s=fm2:rsa-sha256:Oslo9JX9WtCE5KTN/1UZLShIV2GEfn4rSFzKBib3fv7930F 1SouRPYYmNFOcxTPu0nFxAlRX1L0crRUIzM3tZsuL97YzQvXGjgB5AtDdIzRrw+m iLuCYvaK/jOn3PFyGGF9NrjjDipV6Pvv1A3ZLAQp+umIbE2QMeSseSbL8vjFDB7A AiE0pndlQAbDTEonMYuHYlPfIb5kBe064OkDMmctNbADLlN8h5IBu5Id73XxNztK Kk5xFqid/v4XciJPX643EKrGNZWn/JAKxgLjZKlpU82GgC7YHtSL0aqFxg2DoRwI 4XM1Va8Q5AFJn6Gy3Sati8UCAaTMemuiorsAMxg==; X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=mi-m=1; hc=13; hn=cc,content-disposition,content-transfer-encoding, content-type,date,feedback-id,from,in-reply-to,message-id, mime-version,references,subject,to; Message-Instance: m=1; h=sha256:8xo6Vk6oAboeWvwTifOCtzc1krTY2kjS73QRC2kNPnU=:PDubLnqWChn8F2mRffq1eI5WkPFNmZGIqypHwPbWBqI=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTFU7wSrIOfGMf+Jv5ZATHexEl8a1/5W6fjpQv1+7i7zfVXmn99kgmKsqfuRHc8vrY l0fcedvsSs1PQ4s+EDofWBey55iYtvfxXnDP2/aOvfJYGrYu/WEMKGNyY4ZA/W+iXzc1X3 uqkKVZHKPivywtmz/eMQgTz23kWhYy2R1IGnau/3g6r+mcrmLwtkG8RqKZrxgP9Mhn6zP/ PC4yw3K4o0MbdW9Nmx4eviTPtF+FmK0U1TECdvER5u6zgPeQK3+jCml28KyzSCxGtbEECF KQNqPBwsdzqtSaDWBP50HtcG5dXFwClU/jtV9MVInGOotSbgcCz23mwCYPIG1S6PYJnNg2 KUafacYc8LUId9oz/rMyf58hSaABHF5P4eqEpU4UFP0GJSDnTfaPJilwyzr7UBx+dG377s w1wFy9h74Y2Lco5NMFXmAGeHkHnV152M7xHb8xzAlM2SSPNz5yw6KPkQCeRjGkGhZNrOQe DnxmomtdWrxmQ8ug25vqqgHdu9e97V8criiyQaNibW9XSfz10pnvU7Qs1CsX5+u2zShb8W gbotNPaukteorMOMw+2HfTLrIxGs2t5BJwdEbJ0NRSDzjB9Tc+d9JEbmHpCgraAjCX/ATo PvG1rNsJPEuSXNE1QWuJatAdHjldxixNp/6T/GLnxQBkZAd9IoEwA1s7Yjiw X-ME-Proxy: Feedback-ID: i80c9496c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 2 Dec 2026 12:06:08 -0500 (EST) Date: Wed, 2 Dec 2026 18:06:06 +0100 From: Niklas =?utf-8?Q?S=C3=B6derlund?= To: Hyeonjun Hong Cc: Mauro Carvalho Chehab , Geert Uytterhoeven , Magnus Damm , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH 2/2] media: rcar-isp: Fail buffer preparation if the ConfigDMA buffer is full Message-ID: <20261202170606.GL3157946@ragnatech.se> References: <20261202163100.GH3157946@ragnatech.se> <20261202164311.745594-1-hyeonjunhong330@gmail.com> X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20261202164311.745594-1-hyeonjunhong330@gmail.com> Hello Hyeonjun, On 2026-12-03 01:43:11 +0900, Hyeonjun Hong wrote: > Hi Niklas, > > On 2026-12-02 17:31:00 +0100, Niklas Söderlund wrote: > > ... This check while also setting the new overflow flag will return > > -ENOMEM ... > [...] > > ... Which will be propagated and returned here ... > > I do not think it is propagated. The block handlers ignore the return > value of the write callback and return 0, e.g. rppx1_ccor_fill_params(): > > write(priv, mod->base + CCOR_COEFF_REG(0), 0x1000); > [...] > return 0; > > None of the write() calls in the rppx1_*.c handlers is checked, so > rppx1_params() returns 0 after the buffer is full. In the userspace > model, with only patch 1/2 applied, 700 header-only CCOR_POST blocks > give 2047 pairs written and rppx1_params() == 0. You are correct, my bad. And that's not very nice and likely something that should be fixed.. I can't think of a nice idea right now other then patching all rppx1_*.c handlers, let me think on it. Or if you have a nice idea? I think fixing this design flaw is the right solution. Or if we go another way changing the write() callback to void so it is obvious the return value is not used. > > > I don't like adding a flag for this, and it's not needed... > > Understood. Would you prefer one of these instead? > > a) No flag, keep counting in the callback and check the count > afterwards: > > if (desc->count++ >= RISP_IO_PARAMS_MAX_PAIRS) > return -ENOMEM; > > and in risp_io_params_buffer_prepare(): > > if (desc.count > RISP_IO_PARAMS_MAX_PAIRS) > return -ENOMEM; > > b) Make the rppx1 block handlers check and return the result of > write(). That is the proper fix but touches about 170 call sites > in rppx1. If we can't think of something smarter I think this. Or do option (a) and switch the writer callback to void to make it clear the return value is not used. > > c) Drop patch 2/2 and leave it as is. > > Thanks, > Hyeonjun -- Kind Regards, Niklas Söderlund