Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1749085pxy; Thu, 29 Apr 2021 13:42:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznYi/cfo1grRYM14vTsznGdA2geTeYR/p+iok+ftie0Yarstgdq7O5Kqb6Iz8OhOirW1Yg X-Received: by 2002:a05:6402:351:: with SMTP id r17mr1831244edw.186.1619728977879; Thu, 29 Apr 2021 13:42:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619728977; cv=none; d=google.com; s=arc-20160816; b=tDa05J+WrJHC8UIk6yKZqXAhNmrypIO9xGp9cnjvn01eNGR15G9sKfWS3ADEPU8M/e zyK8UEFAZnanj9/uOhbbKIfxZe/TLbWRPAUqvw7KEjypHPdeRJ0DfqsNlyFmgaZPRc6C rTZOEyFA9VZ9tcp2dARG6dhzodwKMgvJtyFEaEQlYUUdYR8VFvtZ06DaMloA0lk719bD nQVPBBtTQgb4kAR230/Uic8kH1OnIyFEzHaMIXQMJSuk8Gm8fQHG2/wKbCPIdrvZkdpS FX7F35EhY0A8wSXa4Azmnrqrdxzh/c9cyCRE6qEVI69ih/mT7/fOChkTWmNlP4FC5SfF Xn8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=ks6dmsag+tmiPq2qdUPsJp3jlIw1EfUZu90is0ESvNU=; b=gcSnGGTDlX8bMzK8/lwWqk8EkQyGWAM18WZ6BJ6P59ilmUjsczmW8QtzAnPskpqbjn Jdrz/hLqGMYtcWg0kZlCjfH7Db7WJQlqrC+PnRIL8+S0Z1XvpWbS3JBc5/yQdO8JVQ19 MhOfXDdj71rkzuPcrr1HTzmtWg82KH1QYRJVNXxFdsBX8HaA3bh2EOtpGh5AzihyiVNJ FBMHy1CUUMYl/Y9P0541hP8Uma5zvYlE5vdS+ZbmCSobGr8aZX1MSB39WXh7+9Jm/E+m YvVftbK40sSY1DhRVXj0MwN34gVxFahAKkNw1S5ITgMBuvcY+DROIrLt2Y7/8YfWr4Dq XYZg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gt9si1051887ejc.524.2021.04.29.13.42.33; Thu, 29 Apr 2021 13:42:57 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236740AbhD2UIw (ORCPT + 99 others); Thu, 29 Apr 2021 16:08:52 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:52426 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236725AbhD2UIv (ORCPT ); Thu, 29 Apr 2021 16:08:51 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 42B0C1C0B9F; Thu, 29 Apr 2021 22:08:04 +0200 (CEST) Date: Thu, 29 Apr 2021 22:08:03 +0200 From: Pavel Machek To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, Aditya Pakki , Hans Verkuil , Mauro Carvalho Chehab Subject: Re: [PATCH 052/190] Revert "media: media/saa7146: fix incorrect assertion in saa7146_buffer_finish" Message-ID: <20210429200803.GE31692@amd> References: <20210421130105.1226686-1-gregkh@linuxfoundation.org> <20210421130105.1226686-53-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="idY8LE8SD6/8DnRI" Content-Disposition: inline In-Reply-To: <20210421130105.1226686-53-gregkh@linuxfoundation.org> User-Agent: Mutt/1.5.23 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --idY8LE8SD6/8DnRI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > Cc: Aditya Pakki > Cc: Hans Verkuil > Cc: Mauro Carvalho Chehab > Signed-off-by: Greg Kroah-Hartman > --- > drivers/media/common/saa7146/saa7146_fops.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/drivers/media/common/saa7146/saa7146_fops.c b/drivers/media/= common/saa7146/saa7146_fops.c > index baf5772c52a9..c256146fd3b6 100644 > --- a/drivers/media/common/saa7146/saa7146_fops.c > +++ b/drivers/media/common/saa7146/saa7146_fops.c > @@ -95,6 +95,8 @@ void saa7146_buffer_finish(struct saa7146_dev *dev, > DEB_EE("dev:%p, dmaq:%p, state:%d\n", dev, q, state); > DEB_EE("q->curr:%p\n", q->curr); > =20 > + BUG_ON(!q->curr); > + > /* finish current buffer */ > if (NULL =3D=3D q->curr) { > DEB_D("aiii. no current buffer\n"); The code is obviously crazy _after_ the revert, so I'd suggest not reverting it. But whether this code has any security problems is quite hard to decide, it was not written with readability in mind :-(. Pavel --=20 http://www.livejournal.com/~pavelmachek --idY8LE8SD6/8DnRI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAmCLEiMACgkQMOfwapXb+vK0LACfRU8bbKn5RV33JmLZN/XFrwd6 gncAnRzMwEp0sgJ8gAmH5DJ1H6bbDwic =Rsza -----END PGP SIGNATURE----- --idY8LE8SD6/8DnRI--