Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.181 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796229828; b=5Kkf+XBrSudGVvrYuKj5nYRsxX7HBwu0bkuzfZD1HhnitP7yuBhEePbPtQlc8QPs9294 hfMT5jxRa2e5gBxtrGGqLjuzcGrzJFqsMsVWslIQJv4CLKHQp/AbuKpv7cIlWcOpXfmXD pgbZFhaKTwXXfZMt+Rb7avOaF00qiBhKxA7rc3jF78NFez0FYv8a8KySV5GcPbuRiluH2 ydkobTab9uRct25cLI8wAelwJ9lND0kIiBWp4+p3QyXZjXy5vBa1gZMjpcH55jM0vlweT MsYuHE6WbhzYE1n+gbzu4iMnDuMzY82il3hyT43HEfzHWvRXXsaovH8kyOKYW6oAz7A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796229828; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To:References: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=IPim/UUNN5eTDuHfR2x7eGmpmRIAoYakMxA1O6te/G0=; b=GalcIlDPTRYvl2wjgesfFxUVOTs8H8qPAy44MbVuo0toBLiZnOZMMExo4au2y7zJJqrP 6vCUf7jslhDget2uGChYaBYpDbctv/mqvf/3Q3ojN03IclBPb5BWCS9oZz5FyOJOIb12O dRH+ow499AvRHhJr1mjTC8CBXhXp8A55kOFwutEWi4Q4TfoBPlbOBRrrOxtDrRqtXq2SA am0Jub1ZFU9JmWIz1YAaJn4+WBuG3Rnu7xqT2CvvaBos+SLwh/Q5C+y9ZuFa2Mg8iZq/x dom5uD9mde5L0T0cU5LSI9ro0o2a9aez6f9seXG+iVM0ZmLqADyOMabFGqpBenKPWsw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=NscaM9Vy; arc=none smtp.remote-ip=209.85.215.181 Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E2C12606A32D for ; Wed, 2 Dec 2026 16:43:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E2C12606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=NscaM9Vy Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-cc751eddf25so8178879a12.3 for ; Wed, 02 Dec 2026 08:43:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796229827; x=1796834627; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=IPim/UUNN5eTDuHfR2x7eGmpmRIAoYakMxA1O6te/G0=; b=NscaM9VyhoJnTVCfkbddtN6WwBLGLs2EEMpsM6N8keExrnHinXMUwZXrW6hRJi5Du5 4Gf+1mDDOnlqamPJH2hwxucMPziqVsuHAi2tSQlIAehMd2OxlViCqZPgUyNrp3U7Xi6C 5+7n7D/8s/Bc4iyP7VXLlWtgHHdUQqJF9Z9cy8wniYnB4bm2GY7+KXwysELDyNZUH3N0 MPy6AGhUbTnP4xVBycfTuwOn94o4lIp5fhTQZYtsiwpki+zUD4y1wRZE3S82Mpk6rZZe LdZrqTnbJSDJG21pj8rMB5VZSqymWhssgzSRpwiB1iUOGgAtyvX313mq4pdEnxaSei3q 9iRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796229827; x=1796834627; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=IPim/UUNN5eTDuHfR2x7eGmpmRIAoYakMxA1O6te/G0=; b=wWVQZPS+iF+6EriWP4CkFrJsIgWU2eWTqoTSzYAWUQ35BByEF5PgRWg2LZ3sZylNkW mq83dZ3c57w6IXCSGq2mUJe9iNNTbARr6lPgHaXNfTCO5lwR4fumIJ7irIjqxcqsRhCe RDUwwLTt8Updn1gHheQZgCq8aIyMsaL9lERGJBgKJsLVVq4o2vdQuoh9yEF/ncrvnHbQ Jip7uZRZZsSgFfOEgETCUNBqoa2XldXFZZTJNz2lNvxL3TuF1zJlHhRvyJrs5UrPlL5X rt28WoUAl/i7SMx5zLvUnAv9gU3zec5dW1zsxddu3OZEiMp96VT9NpcrjWiHkzg21Sim VL4A== X-Forwarded-Encrypted: i=1; AL+hErHIhLaH0sjXDU/JZTNtkJ1VAtBaFvhBwem7bTzroM9Vm8k8NTXVFUfk6rMa2JfkPIxmXiscUKhVEL8lWg==@vger.kernel.org X-Gm-Message-State: APuU4Z/au1Y08VsGgrA2s877gam5EmpTA1ThDqlhjRl961CLxlVaW5TF 7revv02tDz8LNAhZUQXHf8nzTC5b54cZ1qXXeW8nEBBbX6juUmc+FZRd X-Gm-Gg: AZFdTZd6GU5lJk6e64a0Cdkn+Z9y8Vrxe/BC2xMhd4hwdxgKxrKAHmXE8HhH7Jgtqys K3IohLXgvcn9PlDMP0DgTubeoOPN+pkR1ZzkIeiZgkLSR4kmZ9tbD7qxJjDbTqXfxgApFrlr6do hPolZjBtMHaJwmjhhI8qXqEcTgMDgL1+1/d9x2aPTyKxW8YC11PbOdf8LOkIaryyKj9E4XS73Wo vIwiWWEC96yKHCVhwxJr0WRDdWGicQscvVYlUiHpl81Moh8meUkr9+qwkw8sBwjrtzvLsJPmOcH HlnZfRnmYPNoand9EH+XWuitJNg22AP96mOT7psojnulotSlHXA7/dwylTQJTQu0BQ1kXSXWtxj m9EyWceoLn7fZmUdiOcFiqPHwRoj3b1h2HoSQ4eirf1fDrGvchMTyEmfnW5GMawUXVhxvR2gHIy WzdP5QPNReCil9TU3gNkiREbmuw42/v23aDC6qQXQ9HEiwX+shVuNF66jo6cuYiV4RM5iv4BGq+ x98WCBpm2+0hotor6HzhkMjVJMp3APi3afFJLMJUP9lm8MEpHqXz3LGu0smp5TrGlcSvW9ps3T5 vp3rskJm9eBElSYmsqKg5QFreSPJOFiTBiZJu1QDAxcqgmulj2081Q3GTEY8lxOP/CWxNbUlm+9 CU5hpuD68dfT+Iw== X-Received: by 2002:a17:90b:3f0e:b0:3b3:bf8f:9cce with SMTP id 98e67ed59e1d1-3b41c905c98mr41922242a91.35.1796229826876; Wed, 02 Dec 2026 08:43:46 -0800 (PST) Received: from hyeonjun-ThinkPad-X13-Gen-1.. ([124.197.199.8]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b405d96bd3sm66432919a91.12.2026.12.02.08.43.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 08:43:46 -0800 (PST) From: Hyeonjun Hong To: =?UTF-8?q?Niklas=20S=C3=B6derlund?= 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 Date: Thu, 3 Dec 2026 01:43:11 +0900 Message-Id: <20261202164311.745594-1-hyeonjunhong330@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20261202163100.GH3157946@ragnatech.se> References: <20261202163100.GH3157946@ragnatech.se> X-Mailing-List: linux-media@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-Transfer-Encoding: 8bit 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. > 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. c) Drop patch 2/2 and leave it as is. Thanks, Hyeonjun