Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1048912pxf; Thu, 8 Apr 2021 21:20:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4CaMI0yQ1A+IKqwk02lLAi/V/Z8x/6e/kG9hKB8qMkrO4qN8CAVw2QuJc+fywzP7RT44n X-Received: by 2002:a17:907:3e92:: with SMTP id hs18mr13862568ejc.396.1617942041039; Thu, 08 Apr 2021 21:20:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617942041; cv=none; d=google.com; s=arc-20160816; b=iii0Y0iJmersq7ulzQXlNAzRAQeJ6R6XXjFdTzn/DZ61PjkjAt8AlUz0uXv6lkoVFl MK1j2ssw5QqnrO8seMHq6c1it8kImj1fNqNUM3zF2CMCkeDyj/3Qagrpgg4V11l6VHOo 6nEieVKALr7bHxkvwd2lgNlh7JOHPXNOoy+gLhYvdtXr4JOaCVrCOq/9e9PYPgdkoOOu mNBMtnSs1O81xzb+sTzkXB5YQIBdelEkf3QdcWOSKWYARvZwyJMsxkXld7tXhuRGh/O4 wTTjZ9xHGrUSQEomKWXuK+QLvrqYqDzYZLzou0glZ9pPi5YiIz+oRobBhvYpXPWy4ezQ opHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=a0qsp2jIyenJ7KHlPYVUT6/QMykCuCokvpYJBkoNKqc=; b=lZxVEZtDLULlj9lNgzqP2HjnflPbXyRtDXbo7SfPR3iPb/aBA3TLJyHcg8dy/uXV6l 0ck9mM6L+bdMTeIJ6sl1voJrRZq258TLCws+6FlHIymJZgqD08bLBGfYTAPr+UkhU4ZZ +DvtCIGM+/+y8MSpZ5VQO4ymJI7ROWgEkod9JdM5QLYPK7tYPMtL0nrA3N2RIfxYUC7U Q2QgtzP0SZDshZz9VJDH3sM/f9PTXk3RZX6gomR0CxfYgbzMP4wQPtZG/QJb0kJheAOv P7n+mEPvsT707juEmrFSTGvBgvKCVJJhsNKjWfdfeFuBnFQCtIx9dVi5fkT/eRzJiWZt PTLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="UwV8R/Q8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i22si439854ejy.2.2021.04.08.21.20.18; Thu, 08 Apr 2021 21:20:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="UwV8R/Q8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230400AbhDIERN (ORCPT + 99 others); Fri, 9 Apr 2021 00:17:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbhDIERM (ORCPT ); Fri, 9 Apr 2021 00:17:12 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 108E9C061760 for ; Thu, 8 Apr 2021 21:16:59 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id g10so2105110plt.8 for ; Thu, 08 Apr 2021 21:16:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=a0qsp2jIyenJ7KHlPYVUT6/QMykCuCokvpYJBkoNKqc=; b=UwV8R/Q8+Casp+Pr+/Ktx9Z6WK5t0P2rFMKBKIpUjWSSl8OSpfZViFSMulAfx4hbnP W49eveLRdRyxptJtTAhj7Ikfmsb9guP7kMgG4HGKmLeg9RZJ1zmYfrtgkFl1LJLvvd+M jAYoAdCI5eDyI/Y457bz2jfz3irfpyRFuTLaM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=a0qsp2jIyenJ7KHlPYVUT6/QMykCuCokvpYJBkoNKqc=; b=mF5BpwgczmAjDeMl0OPGRTKjfv5DogbK/sUNOTR/l8UoZqwtYv6IdfI8y9XPxdCupK j56+rOMP4P5VMbJ2dcD7+nuFfxA5P5IHoqQ0ohBXwcbq5qdWuvDckt2Ne5gt+Gi83BM/ PLRmHm8tVOxk3CG9tQ30CZarMUmkYQZfawJiM2rFKLGmI4rqfc/r+/nt58awl+MzqiU4 ZKFuGvq1v7gs1YU5pCLbjNd3YKAZ2vp26cTCzqrGd0/UyCJbd84FX557z1X4DaVoC83F Q+sDljNlrqEAJMONlZIFt8mfS/U1CCdoUctGKKRw9/wS+KYX5/jkDmNKbOIAO6PcJta0 jNuQ== X-Gm-Message-State: AOAM533tffSL9zlwWGotBAanK5ZOeAEm0fn7d56ykKk+E13WtyjTtUCp t8G+jgJWW4h8AU/HNUkKeFhR+A== X-Received: by 2002:a17:90b:ecc:: with SMTP id gz12mr11681301pjb.79.1617941818642; Thu, 08 Apr 2021 21:16:58 -0700 (PDT) Received: from chromium.org ([2401:fa00:8f:2:4c17:c5d7:544d:4527]) by smtp.gmail.com with ESMTPSA id y66sm794846pgb.78.2021.04.08.21.16.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Apr 2021 21:16:58 -0700 (PDT) Date: Fri, 9 Apr 2021 13:16:54 +0900 From: Tomasz Figa To: Ricardo Ribalda Cc: Sakari Ailus , Bingbu Cao , Tianshu Qiu , Mauro Carvalho Chehab , Greg Kroah-Hartman , Arnd Bergmann , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v2 2/2] media: staging/intel-ipu3: Fix set_fmt error handling Message-ID: References: <20210315123406.1523607-1-ribalda@chromium.org> <20210315123406.1523607-2-ribalda@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210315123406.1523607-2-ribalda@chromium.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 15, 2021 at 01:34:06PM +0100, Ricardo Ribalda wrote: > If there in an error during a set_fmt, do not overwrite the previous > sizes with the invalid config. > > [ 38.662975] ipu3-imgu 0000:00:05.0: swiotlb buffer is full (sz: 4096 bytes) > [ 38.662980] DMA: Out of SW-IOMMU space for 4096 bytes at device 0000:00:05.0 > [ 38.663010] general protection fault: 0000 [#1] PREEMPT SMP > > Cc: stable@vger.kernel.org > Fixes: 6d5f26f2e045 ("media: staging/intel-ipu3-v4l: reduce kernel stack usage") > Signed-off-by: Ricardo Ribalda > --- > drivers/staging/media/ipu3/ipu3-v4l2.c | 25 ++++++++++++++----------- > 1 file changed, 14 insertions(+), 11 deletions(-) Reviewed-by: Tomasz Figa Best regards, Tomasz