From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tobias Powalowski Subject: Re: [PATCH driver-core-linus] kernfs: add back missing error check in kernfs_fop_mmap() Date: Sun, 20 Apr 2014 18:55:38 +0200 Message-ID: <5353FC0A.2080302@googlemail.com> References: <533D01BD.1010200@googlemail.com> <20140418203825.GK23576@htj.dyndns.org> <5352C7BB.8040009@googlemail.com> <20140420122921.GA32624@htj.dyndns.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1109792061==" Return-path: Received: from mail-ee0-f44.google.com (mail-ee0-f44.google.com [74.125.83.44]) by gabe.freedesktop.org (Postfix) with ESMTP id 9183F6E1E4 for ; Sun, 20 Apr 2014 09:55:47 -0700 (PDT) Received: by mail-ee0-f44.google.com with SMTP id e49so3094753eek.31 for ; Sun, 20 Apr 2014 09:55:45 -0700 (PDT) In-Reply-To: <20140420122921.GA32624@htj.dyndns.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Tejun Heo , gregkh@linuxfoundation.org Cc: Daniel Vetter , =?ISO-8859-1?Q?Thomas_B=E4chler?= , intel-gfx , linux-kernel@vger.kernel.org, davej@redhat.com List-Id: intel-gfx@lists.freedesktop.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============1109792061== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jM6oQsER2Velbkklr2v7ShqAwQ0KNn7fI" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --jM6oQsER2Velbkklr2v7ShqAwQ0KNn7fI Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Am 20.04.2014 14:29, schrieb Tejun Heo: > While updating how mmap enabled kernfs files are handled by lockdep, > 9b2db6e18945 ("sysfs: bail early from kernfs_file_mmap() to avoid > spurious lockdep warning") inadvertently dropped error return check > from kernfs_file_mmap(). The intention was just dropping "if > (ops->mmap)" check as the control won't reach the point if the mmap > callback isn't implemented, but I mistakenly removed the error return > check together with it. > > This led to Xorg crash on i810 which was reported and bisected to the > commit and then to the specific change by Tobias. > > Signed-off-by: Tejun Heo > Reported-and-bisected-by: Tobias Powalowski > References: http://lkml.kernel.org/g/533D01BD.1010200@googlemail.com > --- > Hello, > > Oops, sorry that I didn't see the mistake which seems so obvious now. > Can you please verify that this patch works? > > Thanks a lot for the report and bisection! > > fs/kernfs/file.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c > index 8034706..e01ea4a 100644 > --- a/fs/kernfs/file.c > +++ b/fs/kernfs/file.c > @@ -484,6 +484,8 @@ static int kernfs_fop_mmap(struct file *file, struc= t vm_area_struct *vma) > =20 > ops =3D kernfs_ops(of->kn); > rc =3D ops->mmap(of, vma); > + if (rc) > + goto out_put; > =20 > /* > * PowerPC's pci_mmap of legacy_mem uses shmem_zero_setup() Hi, confirmed patch works fine. Thanks. greetings tpowa --=20 Tobias Powalowski Archlinux Developer & Package Maintainer (tpowa) http://www.archlinux.org tpowa@archlinux.org --jM6oQsER2Velbkklr2v7ShqAwQ0KNn7fI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTU/wNAAoJEHcd9mJ+32gfd7EIAIvCpadAzZBYcHOqvQceN1ES 64daq4hkJckwuMZLi/P+USLN7+7dKk5Pr64OF+l1xf/+NSU4I97z4sPedlVkA2x8 UK8kQ28rKVGTKecN3P5MJP/jx7G01F8LzSiebvLAIHDgYZo/eb/TudTXmqulQqjv 1WEihFE1rG079dp+O0B7ggk9Vhz18zaaXMlJFOvrj1Q/v6JdiB7Uu7xZSer3V+zv BX41ZTy0cLuySuPORRTxZR3KX7AA6Z2zgVNadzCABfbThUHy1A3l/yv9ED2bglfy sTEbufbay21vN7Hwm0+tqKthViIcZpizTEhaa0oEbpJo8s6zIZA6EQn0JSlDaTA= =RYu9 -----END PGP SIGNATURE----- --jM6oQsER2Velbkklr2v7ShqAwQ0KNn7fI-- --===============1109792061== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============1109792061==--