From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tobias Powalowski Subject: Re: 3.14 issue with i810 graphic card bisected Date: Sat, 19 Apr 2014 20:00:50 +0200 Message-ID: <5352B9D2.1020408@googlemail.com> References: <533D01BD.1010200@googlemail.com> <20140418203825.GK23576@htj.dyndns.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0914002976==" Return-path: Received: from mail-ee0-f50.google.com (mail-ee0-f50.google.com [74.125.83.50]) by gabe.freedesktop.org (Postfix) with ESMTP id EA9706E0B6 for ; Sat, 19 Apr 2014 11:00:56 -0700 (PDT) Received: by mail-ee0-f50.google.com with SMTP id c13so2489643eek.23 for ; Sat, 19 Apr 2014 11:00:56 -0700 (PDT) In-Reply-To: <20140418203825.GK23576@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 Cc: davej@redhat.com, Daniel Vetter , =?ISO-8859-1?Q?Thomas_B=E4chler?= , intel-gfx , gregkh@linuxfoundation.org List-Id: intel-gfx@lists.freedesktop.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============0914002976== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="e8vXv5Xt4ROpxqNLIv9LGqOj2HKbb29rX" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --e8vXv5Xt4ROpxqNLIv9LGqOj2HKbb29rX Content-Type: multipart/mixed; boundary="------------070509020504070108010907" This is a multi-part message in MIME format. --------------070509020504070108010907 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Am 18.04.2014 22:38, schrieb Tejun Heo: > Hello, > > Sorry about the long delay. > > On Thu, Apr 03, 2014 at 08:37:49AM +0200, Tobias Powalowski wrote: >> Hi, >> I bisected a X startup crash due to new 3.14 kernel: >> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit= /fs/kernfs/file.c?id=3D9b2db6e1894577d48f4e290381bac6e573593838 >> It's an old intel 810 graphics card which got broken. >> dmesg and xorg.log attached. > Hmm... I'm stumped. The patch shouldn't cause any visible difference > to the userland. I went over it a couple more times and still can't > see how this would make any difference. Can you please do the > followings? > > * Repeat the test on v3.14 with only the patch reverted. If it makes > the problem go away reliably, > > * strace X startup on v3.14 and v3.14 sans the offending patch. > > Thanks! > Hi, attached patch which solves my issue with 3.14.1 interesting part are those4 lines: - if (ops->mmap) - rc =3D ops->mmap(of, vma); - if (rc) - goto out_put; I built kernel with different parts of the bisection patch reverted. Last I added those reverts and it started working again. Hope this helps. greetings tpowa --=20 Tobias Powalowski Archlinux Developer & Package Maintainer (tpowa) http://www.archlinux.org tpowa@archlinux.org --------------070509020504070108010907 Content-Type: text/x-patch; name="fix-i810.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="fix-i810.patch" --- linux-3.14/fs/kernfs/file.c.orig 2014-03-31 05:40:15.000000000 +0200 +++ linux-3.14/fs/kernfs/file.c 2014-04-19 08:22:11.754042780 +0200 @@ -458,16 +458,6 @@ const struct kernfs_ops *ops; int rc; =20 - /* - * mmap path and of->mutex are prone to triggering spurious lockdep - * warnings and we don't want to add spurious locking dependency - * between the two. Check whether mmap is actually implemented - * without grabbing @of->mutex by testing HAS_MMAP flag. See the - * comment in kernfs_file_open() for more details. - */ - if (!(of->kn->flags & KERNFS_HAS_MMAP)) - return -ENODEV; - mutex_lock(&of->mutex); =20 rc =3D -ENODEV; @@ -475,7 +468,10 @@ goto out_unlock; =20 ops =3D kernfs_ops(of->kn); + if (ops->mmap) + rc =3D ops->mmap(of, vma); + if (rc) + goto out_put; - rc =3D ops->mmap(of, vma); =20 /* * PowerPC's pci_mmap of legacy_mem uses shmem_zero_setup() --- linux-3.14/fs/sysfs/file.c.old 2014-03-31 05:40:15.000000000 +0200 +++ linux-3.14/fs/sysfs/file.c 2014-04-19 11:18:53.296366182 +0200 @@ -141,7 +141,10 @@ { struct bin_attribute *battr =3D of->kn->priv; struct kobject *kobj =3D of->kn->parent->priv; - +=09 + if (!battr->mmap) + return -ENODEV; +=09 return battr->mmap(of->file, kobj, battr, vma); } =20 @@ -194,11 +197,6 @@ static const struct kernfs_ops sysfs_bin_kfops_rw =3D { .read =3D sysfs_kf_bin_read, .write =3D sysfs_kf_bin_write, -}; - -static const struct kernfs_ops sysfs_bin_kfops_mmap =3D { - .read =3D sysfs_kf_bin_read, - .write =3D sysfs_kf_bin_write, .mmap =3D sysfs_kf_bin_mmap, }; =20 @@ -234,9 +232,7 @@ } else { struct bin_attribute *battr =3D (void *)attr; =20 - if (battr->mmap) - ops =3D &sysfs_bin_kfops_mmap; - else if (battr->read && battr->write) + if ((battr->read && battr->write) || battr->mmap) ops =3D &sysfs_bin_kfops_rw; else if (battr->read) ops =3D &sysfs_bin_kfops_ro; --------------070509020504070108010907-- --e8vXv5Xt4ROpxqNLIv9LGqOj2HKbb29rX 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/ iQEcBAEBAgAGBQJTUrnVAAoJEHcd9mJ+32gfCdAIAJcZ8BRVkGLiOXSgoXwQy80S YFM+Q86C8EEPoXI9q+gE+VBT5mvjRLzcXhPndjSUc3tij6YELIe69aJw/6/qXwLt S1KVaJ58PEYYNPN7P5WCx7ufyTwx/kaK1yVXM9rOIUIrZFpgm14bpJGC8tS7SzpI 4JoEP5tAJ3i9Cjc01fiRTsnsjkFT+ejY4ooeNw5hTsOqKtmSzZFiGh/xGweo2sin 8Er+nXwbtAoE5wPL7BLqZ5CWEDvZTBBsYKKGvI2c3v2tmK/vLl7itIxdJrkG5Cvt 4h9asJEDtfmOk6I0zdd50JKW06H7Aq99fjQfdgsJWzdi4rWP0DDVWgozOAspjpQ= =Zfat -----END PGP SIGNATURE----- --e8vXv5Xt4ROpxqNLIv9LGqOj2HKbb29rX-- --===============0914002976== 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 --===============0914002976==--