Re: [Intel-gfx] 3.14 issue with i810 graphic card bisected

2014-04-19 Thread Tobias Powalowski
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=9b2db6e1894577d48f4e290381bac6e573593838
 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 = 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

-- 
Tobias Powalowski
Archlinux Developer  Package Maintainer (tpowa)
http://www.archlinux.org
tp...@archlinux.org

--- linux-3.14/fs/kernfs/file.c.orig	2014-03-31 05:40:15.0 +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;
 
-	/*
-	 * 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);
 
 	rc = -ENODEV;
@@ -475,7 +468,10 @@
 		goto out_unlock;
 
 	ops = kernfs_ops(of-kn);
+	if (ops-mmap)
+		rc = ops-mmap(of, vma);
+	if (rc)
+		goto out_put;
-	rc = ops-mmap(of, vma);
 
 	/*
 	 * 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.0 +0200
+++ linux-3.14/fs/sysfs/file.c	2014-04-19 11:18:53.296366182 +0200
@@ -141,7 +141,10 @@
 {
 	struct bin_attribute *battr = of-kn-priv;
 	struct kobject *kobj = of-kn-parent-priv;
-
+	
+	if (!battr-mmap)
+		return -ENODEV;
+	
 	return battr-mmap(of-file, kobj, battr, vma);
 }
 
@@ -194,11 +197,6 @@
 static const struct kernfs_ops sysfs_bin_kfops_rw = {
 	.read		= sysfs_kf_bin_read,
 	.write		= sysfs_kf_bin_write,
-};
-
-static const struct kernfs_ops sysfs_bin_kfops_mmap = {
-	.read		= sysfs_kf_bin_read,
-	.write		= sysfs_kf_bin_write,
 	.mmap		= sysfs_kf_bin_mmap,
 };
 
@@ -234,9 +232,7 @@
 	} else {
 		struct bin_attribute *battr = (void *)attr;
 
-		if (battr-mmap)
-			ops = sysfs_bin_kfops_mmap;
-		else if (battr-read  battr-write)
+		if ((battr-read  battr-write) || battr-mmap)
 			ops = sysfs_bin_kfops_rw;
 		else if (battr-read)
 			ops = sysfs_bin_kfops_ro;


signature.asc
Description: OpenPGP digital signature
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] 3.14 issue with i810 graphic card bisected

2014-04-19 Thread Tobias Powalowski
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=9b2db6e1894577d48f4e290381bac6e573593838
 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 shortened the patch,
indeed only the 5 lines are the error source.
Patch attached.

greetings
tpowa

-- 
Tobias Powalowski
Archlinux Developer  Package Maintainer (tpowa)
http://www.archlinux.org
tp...@archlinux.org

--- linux-3.14/fs/kernfs/file.c.orig	2014-03-31 05:40:15.0 +0200
+++ linux-3.14/fs/kernfs/file.c	2014-04-19 08:22:11.754042780 +0200
@@ -475,7 +468,10 @@
 		goto out_unlock;
 
 	ops = kernfs_ops(of-kn);
+	if (ops-mmap)
+		rc = ops-mmap(of, vma);
+	if (rc)
+		goto out_put;
-	rc = ops-mmap(of, vma);
 
 	/*
 	 * PowerPC's pci_mmap of legacy_mem uses shmem_zero_setup()



signature.asc
Description: OpenPGP digital signature
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] 3.14 issue with i810 graphic card bisected

2014-04-19 Thread Felix Miata
Has no one opened a freedesktop.org bug for this? I couldn't find one for 
i810 changed more recently than 18 months ago.


I have an openSUSE i810E rev03 test system with 1.16.0 RC 2. Newest changelog 
entry 08 April. Last intel driver 2.99.911.1-123.4 changelog entry 02 April.


OK with 3.11 kernel
http://fm.no-ip.com/Tmp/Linux/Xorg/xorg.0.log-201419xorgx11-kern311OK

Bad with 3.14 kernel
http://fm.no-ip.com/Tmp/Linux/Xorg/xorg.0.log-xorgx11-20140419-kern314BAD
--
The wise are known for their understanding, and pleasant
words are persuasive. Proverbs 16:21 (New Living Translation)

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx