Bug 150711 - kernel BUG at fs/attr.c:238! - when installing Slackware packages on overlayfs
Summary: kernel BUG at fs/attr.c:238! - when installing Slackware packages on overlayfs
Status: NEW
Alias: None
Product: File System
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 high
Assignee: fs_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-29 20:22 UTC by Eric Hameleers
Modified: 2016-08-03 17:24 UTC (History)
2 users (show)

See Also:
Kernel Version: 4.4.16
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
Patch fixes the reported issue. (405 bytes, patch)
2016-07-31 15:52 UTC, Eric Hameleers
Details | Diff

Description Eric Hameleers 2016-07-29 20:22:02 UTC
Slackware Live Edition uses squashfs and overlayfs to create the Live environment.
Only with kernel 4.4.16 (not with any of the other 4.4.x kernels before it) the kernel bugs out during installation of Slackware packages into an overlay with one lowerdir, one upperdir and a workdir. The underlying filesystem is ext4. The OS where the Live ISO is being created is Slackware64-current, running inside QEMU with the kvm_amd kernel driver. The host OS is Slackware64 13.37.

The trace is as follows:

[  699.880975] ------------[ cut here ]------------
[  699.883128] kernel BUG at fs/attr.c:238!
[  699.883128] invalid opcode: 0000 [#1] SMP 
[  699.883128] Modules linked in: overlay nls_utf8 cifs fscache autofs4 ipv6 cfg80211 rfkill fuse joydev hid_generic usbhid hid i2c_dev ppdev snd_hda_codec_generic vmwgfx kvm_amd ttm kvm drm_kms_helper drm snd_hda_intel psmouse evdev serio_raw fb_sys_fops syscopyarea sysfillrect irqbypass acpi_cpufreq snd_hda_codec i2c_piix4 sysimgblt i2c_core 8250_fintek tpm_tis snd_hda_core intel_agp snd_hwdep intel_gtt snd_pcm agpgart snd_timer uhci_hcd snd soundcore parport_pc parport ehci_pci ehci_hcd tpm button processor loop ext4 mbcache jbd2 virtio_net virtio_pci virtio_balloon virtio_blk virtio virtio_ring
[  699.883128] CPU: 0 PID: 5899 Comm: tar-1.13 Not tainted 4.4.16 #1
[  699.883128] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[  699.883128] task: ffff88007b026300 ti: ffff880060ad4000 task.ti: ffff880060ad4000
[  699.883128] RIP: 0010:[<ffffffff811dca0e>]  [<ffffffff811dca0e>] notify_change+0x2fe/0x360
[  699.883128] RSP: 0018:ffff880060ad7db8  EFLAGS: 00010202
[  699.883128] RAX: 00000000579b6d70 RBX: 0000000000001847 RCX: 000000000000001c
[  699.883128] RDX: 0000000036095a33 RSI: 0000000036095a33 RDI: 00000000579b6d70
[  699.883128] RBP: ffff880060ad7de8 R08: 00000000ffffffc3 R09: 0000000000000000
[  699.883128] R10: ffffea0001eba600 R11: ffff880059b4fe78 R12: ffff880060ad7e80
[  699.883128] R13: ffff880059b4ff00 R14: 00000000000089c9 R15: ffff880059b68948
[  699.883128] FS:  00007f260c5f9700(0000) GS:ffff88007f400000(0000) knlGS:0000000000000000
[  699.883128] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  699.883128] CR2: 0000000000ff56d8 CR3: 0000000075351000 CR4: 00000000000006f0
[  699.883128] Stack:
[  699.883128]  0000000000000000 0000000000000000 ffff880060ad7e80 ffff880059b4fe40
[  699.883128]  ffff880059b4ff00 ffff880059b9c000 ffff880060ad7e18 ffffffffc072bfe1
[  699.883128]  0000000000001847 ffff880060ad7e80 ffff880059b4fe40 0000000000000008
[  699.883128] Call Trace:
[  699.883128]  [<ffffffffc072bfe1>] ovl_setattr+0x81/0xc0 [overlay]
[  699.883128]  [<ffffffff811dc955>] notify_change+0x245/0x360
[  699.883128]  [<ffffffff811beec9>] chown_common.isra.13+0x119/0x1a0
[  699.883128]  [<ffffffff811d0092>] ? getname_flags+0x72/0x1f0
[  699.883128]  [<ffffffff811e04c6>] ? __mnt_want_write+0x56/0x60
[  699.883128]  [<ffffffff811c0247>] SyS_chown+0x87/0xe0
[  699.883128]  [<ffffffff81677b5b>] entry_SYSCALL_64_fastpath+0x16/0x6a
[  699.883128] Code: 89 e6 48 89 df e8 53 3f 02 00 e9 14 fe ff ff 83 c8 01 41 89 04 24 89 c3 41 0f b7 17 e9 ed fe ff ff b8 ff ff ff ff e9 fa fd ff ff <0f> 0b 48 3b 50 30 0f 85 84 fe ff ff e9 1d ff ff ff 4c 89 e6 4c 
[  699.883128] RIP  [<ffffffff811dca0e>] notify_change+0x2fe/0x360
[  699.883128]  RSP <ffff880060ad7db8>
[  700.036355] ---[ end trace c6d40fb3d87c9ce5 ]---
[  708.890138] ------------[ cut here ]------------
[  708.891053] kernel BUG at fs/attr.c:238!
[  708.891053] invalid opcode: 0000 [#2] SMP 
[  708.891053] Modules linked in: overlay nls_utf8 cifs fscache autofs4 ipv6 cfg80211 rfkill fuse joydev hid_generic usbhid hid i2c_dev ppdev snd_hda_codec_generic vmwgfx kvm_amd ttm kvm drm_kms_helper drm snd_hda_intel psmouse evdev serio_raw fb_sys_fops syscopyarea sysfillrect irqbypass acpi_cpufreq snd_hda_codec i2c_piix4 sysimgblt i2c_core 8250_fintek tpm_tis snd_hda_core intel_agp snd_hwdep intel_gtt snd_pcm agpgart snd_timer uhci_hcd snd soundcore parport_pc parport ehci_pci ehci_hcd tpm button processor loop ext4 mbcache jbd2 virtio_net virtio_pci virtio_balloon virtio_blk virtio virtio_ring
[  708.891053] CPU: 1 PID: 7769 Comm: tar-1.13 Tainted: G      D         4.4.16 #1
[  708.891053] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[  708.891053] task: ffff880060b04d00 ti: ffff8800609a4000 task.ti: ffff8800609a4000
[  708.891053] RIP: 0010:[<ffffffff811dca0e>]  [<ffffffff811dca0e>] notify_change+0x2fe/0x360
[  708.891053] RSP: 0018:ffff8800609a7db8  EFLAGS: 00010202
[  708.891053] RAX: 00000000579b6d79 RBX: 0000000000001847 RCX: 000000000000001c
[  708.891053] RDX: 0000000036a1ef09 RSI: 0000000036a1ef09 RDI: 00000000579b6d79
[  708.891053] RBP: ffff8800609a7de8 R08: 0000000000000008 R09: ffff88007afc2480
[  708.891053] R10: ffffea0001d49000 R11: ffff88005626dcf8 R12: ffff8800609a7e80
[  708.891053] R13: ffff88005626db40 R14: 00000000000089e8 R15: ffff8800562b00e8
[  708.891053] FS:  00007efd70885700(0000) GS:ffff88007f500000(0000) knlGS:0000000000000000
[  708.891053] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  708.891053] CR2: 00007efd708c0000 CR3: 000000005f84e000 CR4: 00000000000006e0
[  708.891053] Stack:
[  708.891053]  0000000000000000 0000000000000000 ffff8800609a7e80 ffff88005626dcc0
[  708.891053]  ffff88005626db40 ffff8800562acd50 ffff8800609a7e18 ffffffffc072bfe1
[  708.891053]  0000000000001847 ffff8800609a7e80 ffff88005626dcc0 0000000000000008
[  708.891053] Call Trace:
[  708.891053]  [<ffffffffc072bfe1>] ovl_setattr+0x81/0xc0 [overlay]
[  708.891053]  [<ffffffff811dc955>] notify_change+0x245/0x360
[  708.891053]  [<ffffffff811beec9>] chown_common.isra.13+0x119/0x1a0
[  708.891053]  [<ffffffff811d0092>] ? getname_flags+0x72/0x1f0
[  708.891053]  [<ffffffff811e04c6>] ? __mnt_want_write+0x56/0x60
[  708.891053]  [<ffffffff811c0247>] SyS_chown+0x87/0xe0
[  708.891053]  [<ffffffff81677b5b>] entry_SYSCALL_64_fastpath+0x16/0x6a
[  708.891053] Code: 89 e6 48 89 df e8 53 3f 02 00 e9 14 fe ff ff 83 c8 01 41 89 04 24 89 c3 41 0f b7 17 e9 ed fe ff ff b8 ff ff ff ff e9 fa fd ff ff <0f> 0b 48 3b 50 30 0f 85 84 fe ff ff e9 1d ff ff ff 4c 89 e6 4c 
[  708.891053] RIP  [<ffffffff811dca0e>] notify_change+0x2fe/0x360
[  708.891053]  RSP <ffff8800609a7db8>
[  709.030819] ---[ end trace c6d40fb3d87c9ce6 ]---
[  743.705867] ------------[ cut here ]------------
[  743.706737] kernel BUG at fs/attr.c:238!
[  743.706737] invalid opcode: 0000 [#3] SMP 
[  743.706737] Modules linked in: overlay nls_utf8 cifs fscache autofs4 ipv6 cfg80211 rfkill fuse joydev hid_generic usbhid hid i2c_dev ppdev snd_hda_codec_generic vmwgfx kvm_amd ttm kvm drm_kms_helper drm snd_hda_intel psmouse evdev serio_raw fb_sys_fops syscopyarea sysfillrect irqbypass acpi_cpufreq snd_hda_codec i2c_piix4 sysimgblt i2c_core 8250_fintek tpm_tis snd_hda_core intel_agp snd_hwdep intel_gtt snd_pcm agpgart snd_timer uhci_hcd snd soundcore parport_pc parport ehci_pci ehci_hcd tpm button processor loop ext4 mbcache jbd2 virtio_net virtio_pci virtio_balloon virtio_blk virtio virtio_ring
[  743.706737] CPU: 0 PID: 10790 Comm: tar-1.13 Tainted: G      D         4.4.16 #1
[  743.706737] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[  743.706737] task: ffff88005fb72100 ti: ffff8800609a4000 task.ti: ffff8800609a4000
[  743.706737] RIP: 0010:[<ffffffff811dca0e>]  [<ffffffff811dca0e>] notify_change+0x2fe/0x360
[  743.706737] RSP: 0018:ffff8800609a7db8  EFLAGS: 00010202
[  743.706737] RAX: 00000000579b6d9c RBX: 0000000000001847 RCX: 000000000000001c
[  743.706737] RDX: 000000002b9b087d RSI: 000000002b9b087d RDI: 00000000579b6d9c
[  743.706737] RBP: ffff8800609a7de8 R08: 00000000ffffffc3 R09: 0000000000000000
[  743.706737] R10: ffffea00017ede00 R11: ffff880041e68c38 R12: ffff8800609a7e80
[  743.706737] R13: ffff880041e68a80 R14: 00000000000089c9 R15: ffff880041e4eef8
[  743.706737] FS:  00007f358d352700(0000) GS:ffff88007f400000(0000) knlGS:0000000000000000
[  743.706737] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  743.706737] CR2: 0000000001b1c6d8 CR3: 000000007aeb5000 CR4: 00000000000006f0
[  743.706737] Stack:
[  743.706737]  0000000000000000 0000000000000000 ffff8800609a7e80 ffff880041e68c00
[  743.706737]  ffff880041e68a80 ffff880041e87868 ffff8800609a7e18 ffffffffc072bfe1
[  743.706737]  0000000000001847 ffff8800609a7e80 ffff880041e68c00 0000000000000008
[  743.706737] Call Trace:
[  743.706737]  [<ffffffffc072bfe1>] ovl_setattr+0x81/0xc0 [overlay]
[  743.706737]  [<ffffffff811dc955>] notify_change+0x245/0x360
[  743.706737]  [<ffffffff811beec9>] chown_common.isra.13+0x119/0x1a0
[  743.706737]  [<ffffffff811d0092>] ? getname_flags+0x72/0x1f0
[  743.706737]  [<ffffffff811e04c6>] ? __mnt_want_write+0x56/0x60
[  743.706737]  [<ffffffff811c0247>] SyS_chown+0x87/0xe0
[  743.706737]  [<ffffffff81677b5b>] entry_SYSCALL_64_fastpath+0x16/0x6a
[  743.706737] Code: 89 e6 48 89 df e8 53 3f 02 00 e9 14 fe ff ff 83 c8 01 41 89 04 24 89 c3 41 0f b7 17 e9 ed fe ff ff b8 ff ff ff ff e9 fa fd ff ff <0f> 0b 48 3b 50 30 0f 85 84 fe ff ff e9 1d ff ff ff 4c 89 e6 4c 
[  743.706737] RIP  [<ffffffff811dca0e>] notify_change+0x2fe/0x360
[  743.706737]  RSP <ffff8800609a7db8>
[  743.854446] ---[ end trace c6d40fb3d87c9ce7 ]---
[  799.297438] ------------[ cut here ]------------
[  799.298351] kernel BUG at fs/attr.c:238!
[  799.298351] invalid opcode: 0000 [#4] SMP 
[  799.298351] Modules linked in: overlay nls_utf8 cifs fscache autofs4 ipv6 cfg80211 rfkill fuse joydev hid_generic usbhid hid i2c_dev ppdev snd_hda_codec_generic vmwgfx kvm_amd ttm kvm drm_kms_helper drm snd_hda_intel psmouse evdev serio_raw fb_sys_fops syscopyarea sysfillrect irqbypass acpi_cpufreq snd_hda_codec i2c_piix4 sysimgblt i2c_core 8250_fintek tpm_tis snd_hda_core intel_agp snd_hwdep intel_gtt snd_pcm agpgart snd_timer uhci_hcd snd soundcore parport_pc parport ehci_pci ehci_hcd tpm button processor loop ext4 mbcache jbd2 virtio_net virtio_pci virtio_balloon virtio_blk virtio virtio_ring
[  799.298351] CPU: 0 PID: 18830 Comm: tar-1.13 Tainted: G      D         4.4.16 #1
[  799.298351] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[  799.298351] task: ffff88005fb74200 ti: ffff88005f938000 task.ti: ffff88005f938000
[  799.298351] RIP: 0010:[<ffffffff811dca0e>]  [<ffffffff811dca0e>] notify_change+0x2fe/0x360
[  799.298351] RSP: 0018:ffff88005f93bdb8  EFLAGS: 00010202
[  799.298351] RAX: 00000000579b6dd4 RBX: 0000000000001847 RCX: 000000000000001c
[  799.298351] RDX: 0000000013497d89 RSI: 0000000013497d89 RDI: 00000000579b6dd4
[  799.298351] RBP: ffff88005f93bde8 R08: 00000000ffffffc3 R09: 0000000000000000
[  799.298351] R10: ffffea00017e4c00 R11: ffff8800215a07c0 R12: ffff88005f93be80
[  799.298351] R13: ffff8800215a0840 R14: 00000000000089c9 R15: ffff8800215f3b88
[  799.298351] FS:  00007f5f62e90700(0000) GS:ffff88007f400000(0000) knlGS:0000000000000000
[  799.298351] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  799.298351] CR2: 000000000087b0a8 CR3: 000000007533f000 CR4: 00000000000006f0
[  799.298351] Stack:
[  799.298351]  0000000000000000 0000000000000000 ffff88005f93be80 ffff8800215a0780
[  799.298351]  ffff8800215a0840 ffff880021611aa0 ffff88005f93be18 ffffffffc072bfe1
[  799.298351]  0000000000001847 ffff88005f93be80 ffff8800215a0780 0000000000000008
[  799.298351] Call Trace:
[  799.298351]  [<ffffffffc072bfe1>] ovl_setattr+0x81/0xc0 [overlay]
[  799.298351]  [<ffffffff811dc955>] notify_change+0x245/0x360
[  799.298351]  [<ffffffff811beec9>] chown_common.isra.13+0x119/0x1a0
[  799.298351]  [<ffffffff811d0092>] ? getname_flags+0x72/0x1f0
[  799.298351]  [<ffffffff811e04c6>] ? __mnt_want_write+0x56/0x60
[  799.298351]  [<ffffffff811c0247>] SyS_chown+0x87/0xe0
[  799.298351]  [<ffffffff81677b5b>] entry_SYSCALL_64_fastpath+0x16/0x6a
[  799.298351] Code: 89 e6 48 89 df e8 53 3f 02 00 e9 14 fe ff ff 83 c8 01 41 89 04 24 89 c3 41 0f b7 17 e9 ed fe ff ff b8 ff ff ff ff e9 fa fd ff ff <0f> 0b 48 3b 50 30 0f 85 84 fe ff ff e9 1d ff ff ff 4c 89 e6 4c 
[  799.298351] RIP  [<ffffffff811dca0e>] notify_change+0x2fe/0x360
[  799.298351]  RSP <ffff88005f93bdb8>
[  799.455609] ---[ end trace c6d40fb3d87c9ce8 ]---
[  811.253781] ------------[ cut here ]------------
[  811.254671] kernel BUG at fs/attr.c:238!
[  811.254671] invalid opcode: 0000 [#5] SMP 
[  811.254671] Modules linked in: overlay nls_utf8 cifs fscache autofs4 ipv6 cfg80211 rfkill fuse joydev hid_generic usbhid hid i2c_dev ppdev snd_hda_codec_generic vmwgfx kvm_amd ttm kvm drm_kms_helper drm snd_hda_intel psmouse evdev serio_raw fb_sys_fops syscopyarea sysfillrect irqbypass acpi_cpufreq snd_hda_codec i2c_piix4 sysimgblt i2c_core 8250_fintek tpm_tis snd_hda_core intel_agp snd_hwdep intel_gtt snd_pcm agpgart snd_timer uhci_hcd snd soundcore parport_pc parport ehci_pci ehci_hcd tpm button processor loop ext4 mbcache jbd2 virtio_net virtio_pci virtio_balloon virtio_blk virtio virtio_ring
[  811.254671] CPU: 1 PID: 22167 Comm: tar-1.13 Tainted: G      D         4.4.16 #1
[  811.254671] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[  811.254671] task: ffff88005fb71600 ti: ffff880041244000 task.ti: ffff880041244000
[  811.254671] RIP: 0010:[<ffffffff811dca0e>]  [<ffffffff811dca0e>] notify_change+0x2fe/0x360
[  811.254671] RSP: 0018:ffff880041247db8  EFLAGS: 00010202
[  811.254671] RAX: 00000000579b6de0 RBX: 0000000000001847 RCX: 000000000000001c
[  811.254671] RDX: 0000000010aa1f25 RSI: 0000000010aa1f25 RDI: 00000000579b6de0
[  811.254671] RBP: ffff880041247de8 R08: 00000000ffffffc3 R09: 0000000000000000
[  811.254671] R10: ffffea00017e6400 R11: ffff88001f3bec38 R12: ffff880041247e80
[  811.254671] R13: ffff88001f3bed80 R14: 00000000000089ed R15: ffff88001c3aaef8
[  811.254671] FS:  00007fb5c7bdb700(0000) GS:ffff88007f500000(0000) knlGS:0000000000000000
[  811.254671] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  811.254671] CR2: 0000000000f746d8 CR3: 000000007ae84000 CR4: 00000000000006e0
[  811.254671] Stack:
[  811.254671]  0000000000000000 0000000000000000 ffff880041247e80 ffff88001f3bec00
[  811.254671]  ffff88001f3bed80 ffff88001c374000 ffff880041247e18 ffffffffc072bfe1
[  811.254671]  0000000000001847 ffff880041247e80 ffff88001f3bec00 0000000000000008
[  811.254671] Call Trace:
[  811.254671]  [<ffffffffc072bfe1>] ovl_setattr+0x81/0xc0 [overlay]
[  811.254671]  [<ffffffff811dc955>] notify_change+0x245/0x360
[  811.254671]  [<ffffffff811beec9>] chown_common.isra.13+0x119/0x1a0
[  811.254671]  [<ffffffff811d0092>] ? getname_flags+0x72/0x1f0
[  811.254671]  [<ffffffff811e04c6>] ? __mnt_want_write+0x56/0x60
[  811.254671]  [<ffffffff811c0247>] SyS_chown+0x87/0xe0
[  811.254671]  [<ffffffff81677b5b>] entry_SYSCALL_64_fastpath+0x16/0x6a
[  811.254671] Code: 89 e6 48 89 df e8 53 3f 02 00 e9 14 fe ff ff 83 c8 01 41 89 04 24 89 c3 41 0f b7 17 e9 ed fe ff ff b8 ff ff ff ff e9 fa fd ff ff <0f> 0b 48 3b 50 30 0f 85 84 fe ff ff e9 1d ff ff ff 4c 89 e6 4c 
[  811.254671] RIP  [<ffffffff811dca0e>] notify_change+0x2fe/0x360
[  811.254671]  RSP <ffff880041247db8>
[  811.409348] ---[ end trace c6d40fb3d87c9ce9 ]---
[  821.523276] ------------[ cut here ]------------
[  821.524176] kernel BUG at fs/attr.c:238!
[  821.524176] invalid opcode: 0000 [#6] SMP 
[  821.524176] Modules linked in: overlay nls_utf8 cifs fscache autofs4 ipv6 cfg80211 rfkill fuse joydev hid_generic usbhid hid i2c_dev ppdev snd_hda_codec_generic vmwgfx kvm_amd ttm kvm drm_kms_helper drm snd_hda_intel psmouse evdev serio_raw fb_sys_fops syscopyarea sysfillrect irqbypass acpi_cpufreq snd_hda_codec i2c_piix4 sysimgblt i2c_core 8250_fintek tpm_tis snd_hda_core intel_agp snd_hwdep intel_gtt snd_pcm agpgart snd_timer uhci_hcd snd soundcore parport_pc parport ehci_pci ehci_hcd tpm button processor loop ext4 mbcache jbd2 virtio_net virtio_pci virtio_balloon virtio_blk virtio virtio_ring
[  821.524176] CPU: 0 PID: 23115 Comm: tar-1.13 Tainted: G      D         4.4.16 #1
[  821.524176] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[  821.524176] task: ffff88005f8be300 ti: ffff880041004000 task.ti: ffff880041004000
[  821.524176] RIP: 0010:[<ffffffff811dca0e>]  [<ffffffff811dca0e>] notify_change+0x2fe/0x360
[  821.524176] RSP: 0018:ffff880041007db8  EFLAGS: 00010202
[  821.524176] RAX: 00000000579b6dea RBX: 0000000000001847 RCX: 000000000000001c
[  821.524176] RDX: 0000000020c20266 RSI: 0000000020c20266 RDI: 00000000579b6dea
[  821.524176] RBP: ffff880041007de8 R08: 00000000ffffffc3 R09: 0000000000000000
[  821.524176] R10: ffffea0000620c00 R11: ffff880011839938 R12: ffff880041007e80
[  821.524176] R13: ffff8800118399c0 R14: 00000000000089c9 R15: ffff88001182a268
[  821.524176] FS:  00007f2525471700(0000) GS:ffff88007f400000(0000) knlGS:0000000000000000
[  821.524176] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  821.524176] CR2: 0000000001eba6d8 CR3: 0000000060a71000 CR4: 00000000000006f0
[  821.524176] Stack:
[  821.524176]  0000000000000000 0000000000000000 ffff880041007e80 ffff880011839900
[  821.524176]  ffff8800118399c0 ffff880011825cd8 ffff880041007e18 ffffffffc072bfe1
[  821.524176]  0000000000001847 ffff880041007e80 ffff880011839900 0000000000000008
[  821.524176] Call Trace:
[  821.524176]  [<ffffffffc072bfe1>] ovl_setattr+0x81/0xc0 [overlay]
[  821.524176]  [<ffffffff811dc955>] notify_change+0x245/0x360
[  821.524176]  [<ffffffff811beec9>] chown_common.isra.13+0x119/0x1a0
[  821.524176]  [<ffffffff811d0092>] ? getname_flags+0x72/0x1f0
[  821.524176]  [<ffffffff811e04c6>] ? __mnt_want_write+0x56/0x60
[  821.524176]  [<ffffffff811c0247>] SyS_chown+0x87/0xe0
[  821.524176]  [<ffffffff81677b5b>] entry_SYSCALL_64_fastpath+0x16/0x6a
[  821.524176] Code: 89 e6 48 89 df e8 53 3f 02 00 e9 14 fe ff ff 83 c8 01 41 89 04 24 89 c3 41 0f b7 17 e9 ed fe ff ff b8 ff ff ff ff e9 fa fd ff ff <0f> 0b 48 3b 50 30 0f 85 84 fe ff ff e9 1d ff ff ff 4c 89 e6 4c 
[  821.524176] RIP  [<ffffffff811dca0e>] notify_change+0x2fe/0x360
[  821.524176]  RSP <ffff880041007db8>
[  821.673480] ---[ end trace c6d40fb3d87c9cea ]---
[  825.693304] ------------[ cut here ]------------
[  825.694094] kernel BUG at fs/attr.c:238!
[  825.694094] invalid opcode: 0000 [#7] SMP 
[  825.694094] Modules linked in: overlay nls_utf8 cifs fscache autofs4 ipv6 cfg80211 rfkill fuse joydev hid_generic usbhid hid i2c_dev ppdev snd_hda_codec_generic vmwgfx kvm_amd ttm kvm drm_kms_helper drm snd_hda_intel psmouse evdev serio_raw fb_sys_fops syscopyarea sysfillrect irqbypass acpi_cpufreq snd_hda_codec i2c_piix4 sysimgblt i2c_core 8250_fintek tpm_tis snd_hda_core intel_agp snd_hwdep intel_gtt snd_pcm agpgart snd_timer uhci_hcd snd soundcore parport_pc parport ehci_pci ehci_hcd tpm button processor loop ext4 mbcache jbd2 virtio_net virtio_pci virtio_balloon virtio_blk virtio virtio_ring
[  825.694094] CPU: 1 PID: 23433 Comm: tar-1.13 Tainted: G      D         4.4.16 #1
[  825.694094] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[  825.694094] task: ffff88005f8b8000 ti: ffff880041008000 task.ti: ffff880041008000
[  825.694094] RIP: 0010:[<ffffffff811dca0e>]  [<ffffffff811dca0e>] notify_change+0x2fe/0x360
[  825.694094] RSP: 0018:ffff88004100bdb8  EFLAGS: 00010202
[  825.694094] RAX: 00000000579b6dee RBX: 0000000000001847 RCX: 000000000000001c
[  825.694094] RDX: 000000002ae4025f RSI: 000000002ae4025f RDI: 00000000579b6dee
[  825.694094] RBP: ffff88004100bde8 R08: 0000000000000000 R09: 0000000000000001
[  825.694094] R10: ffffea000104d000 R11: ffff8800118d76f8 R12: ffff88004100be80
[  825.694094] R13: ffff8800118d73c0 R14: 00000000000085ed R15: ffff8800118d2268
[  825.694094] FS:  00007fbd3997c700(0000) GS:ffff88007f500000(0000) knlGS:0000000000000000
[  825.694094] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  825.694094] CR2: 00007fbd399b7000 CR3: 000000005fb97000 CR4: 00000000000006e0
[  825.694094] Stack:
[  825.694094]  0000000000000000 0000000000000000 ffff88004100be80 ffff8800118d76c0
[  825.694094]  ffff8800118d73c0 ffff880011824470 ffff88004100be18 ffffffffc072bfe1
[  825.694094]  0000000000001847 ffff88004100be80 ffff8800118d76c0 0000000000000408
[  825.694094] Call Trace:
[  825.694094]  [<ffffffffc072bfe1>] ovl_setattr+0x81/0xc0 [overlay]
[  825.694094]  [<ffffffff811dc955>] notify_change+0x245/0x360
[  825.694094]  [<ffffffff811beec9>] chown_common.isra.13+0x119/0x1a0
[  825.694094]  [<ffffffff811d0092>] ? getname_flags+0x72/0x1f0
[  825.694094]  [<ffffffff811e04c6>] ? __mnt_want_write+0x56/0x60
[  825.694094]  [<ffffffff811c0247>] SyS_chown+0x87/0xe0
[  825.694094]  [<ffffffff81677b5b>] entry_SYSCALL_64_fastpath+0x16/0x6a
[  825.694094] Code: 89 e6 48 89 df e8 53 3f 02 00 e9 14 fe ff ff 83 c8 01 41 89 04 24 89 c3 41 0f b7 17 e9 ed fe ff ff b8 ff ff ff ff e9 fa fd ff ff <0f> 0b 48 3b 50 30 0f 85 84 fe ff ff e9 1d ff ff ff 4c 89 e6 4c 
[  825.694094] RIP  [<ffffffff811dca0e>] notify_change+0x2fe/0x360
[  825.694094]  RSP <ffff88004100bdb8>
[  825.843685] ---[ end trace c6d40fb3d87c9ceb ]---
[  830.300367] ------------[ cut here ]------------
[  830.301245] kernel BUG at fs/attr.c:238!
[  830.301245] invalid opcode: 0000 [#8] SMP 
[  830.301245] Modules linked in: overlay nls_utf8 cifs fscache autofs4 ipv6 cfg80211 rfkill fuse joydev hid_generic usbhid hid i2c_dev ppdev snd_hda_codec_generic vmwgfx kvm_amd ttm kvm drm_kms_helper drm snd_hda_intel psmouse evdev serio_raw fb_sys_fops syscopyarea sysfillrect irqbypass acpi_cpufreq snd_hda_codec i2c_piix4 sysimgblt i2c_core 8250_fintek tpm_tis snd_hda_core intel_agp snd_hwdep intel_gtt snd_pcm agpgart snd_timer uhci_hcd snd soundcore parport_pc parport ehci_pci ehci_hcd tpm button processor loop ext4 mbcache jbd2 virtio_net virtio_pci virtio_balloon virtio_blk virtio virtio_ring
[  830.301245] CPU: 0 PID: 23758 Comm: tar-1.13 Tainted: G      D         4.4.16 #1
[  830.301245] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[  830.301245] task: ffff88005fb73700 ti: ffff88005f988000 task.ti: ffff88005f988000
[  830.301245] RIP: 0010:[<ffffffff811dca0e>]  [<ffffffff811dca0e>] notify_change+0x2fe/0x360
[  830.301245] RSP: 0018:ffff88005f98bdb8  EFLAGS: 00010202
[  830.301245] RAX: 00000000579b6df3 RBX: 0000000000001847 RCX: 000000000000001c
[  830.301245] RDX: 0000000013774fb7 RSI: 0000000013774fb7 RDI: 00000000579b6df3
[  830.301245] RBP: ffff88005f98bde8 R08: 00000000ffffffc3 R09: 0000000000000000
[  830.301245] R10: ffffea000104bc00 R11: ffff880011911638 R12: ffff88005f98be80
[  830.301245] R13: ffff880011911840 R14: 00000000000089c9 R15: ffff880011922268
[  830.301245] FS:  00007f7ad9dcf700(0000) GS:ffff88007f400000(0000) knlGS:0000000000000000
[  830.301245] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  830.301245] CR2: 000000000143f118 CR3: 0000000060bd2000 CR4: 00000000000006f0
[  830.301245] Stack:
[  830.301245]  0000000000000000 0000000000000000 ffff88005f98be80 ffff880011911600
[  830.301245]  ffff880011911840 ffff8800118fe238 ffff88005f98be18 ffffffffc072bfe1
[  830.301245]  0000000000001847 ffff88005f98be80 ffff880011911600 0000000000000008
[  830.301245] Call Trace:
[  830.301245]  [<ffffffffc072bfe1>] ovl_setattr+0x81/0xc0 [overlay]
[  830.301245]  [<ffffffff811dc955>] notify_change+0x245/0x360
[  830.301245]  [<ffffffff811beec9>] chown_common.isra.13+0x119/0x1a0
[  830.301245]  [<ffffffff811d0092>] ? getname_flags+0x72/0x1f0
[  830.301245]  [<ffffffff811e04c6>] ? __mnt_want_write+0x56/0x60
[  830.301245]  [<ffffffff811c0247>] SyS_chown+0x87/0xe0
[  830.301245]  [<ffffffff81677b5b>] entry_SYSCALL_64_fastpath+0x16/0x6a
[  830.301245] Code: 89 e6 48 89 df e8 53 3f 02 00 e9 14 fe ff ff 83 c8 01 41 89 04 24 89 c3 41 0f b7 17 e9 ed fe ff ff b8 ff ff ff ff e9 fa fd ff ff <0f> 0b 48 3b 50 30 0f 85 84 fe ff ff e9 1d ff ff ff 4c 89 e6 4c 
[  830.301245] RIP  [<ffffffff811dca0e>] notify_change+0x2fe/0x360
[  830.301245]  RSP <ffff88005f98bdb8>
[  830.450579] ---[ end trace c6d40fb3d87c9cec ]---
[  839.033659] ------------[ cut here ]------------
[  839.034079] kernel BUG at fs/attr.c:238!
[  839.034079] invalid opcode: 0000 [#9] SMP 
[  839.034079] Modules linked in: overlay nls_utf8 cifs fscache autofs4 ipv6 cfg80211 rfkill fuse joydev hid_generic usbhid hid i2c_dev ppdev snd_hda_codec_generic vmwgfx kvm_amd ttm kvm drm_kms_helper drm snd_hda_intel psmouse evdev serio_raw fb_sys_fops syscopyarea sysfillrect irqbypass acpi_cpufreq snd_hda_codec i2c_piix4 sysimgblt i2c_core 8250_fintek tpm_tis snd_hda_core intel_agp snd_hwdep intel_gtt snd_pcm agpgart snd_timer uhci_hcd snd soundcore parport_pc parport ehci_pci ehci_hcd tpm button processor loop ext4 mbcache jbd2 virtio_net virtio_pci virtio_balloon virtio_blk virtio virtio_ring
[  839.034079] CPU: 1 PID: 24813 Comm: tar-1.13 Tainted: G      D         4.4.16 #1
[  839.034079] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[  839.034079] task: ffff88005f8bd800 ti: ffff880041020000 task.ti: ffff880041020000
[  839.034079] RIP: 0010:[<ffffffff811dca0e>]  [<ffffffff811dca0e>] notify_change+0x2fe/0x360
[  839.034079] RSP: 0018:ffff880041023db8  EFLAGS: 00010202
[  839.034079] RAX: 00000000579b6dfc RBX: 0000000000001847 RCX: 000000000000001c
[  839.034079] RDX: 00000000038d39e3 RSI: 00000000038d39e3 RDI: 00000000579b6dfc
[  839.034079] RBP: ffff880041023de8 R08: 0000000000000000 R09: 0000000000000001
[  839.034079] R10: ffffea000104d000 R11: ffff880011b747c0 R12: ffff880041023e80
[  839.034079] R13: ffff880011b74840 R14: 00000000000085ed R15: ffff880011b6eac8
[  839.034079] FS:  00007efd2fea0700(0000) GS:ffff88007f500000(0000) knlGS:0000000000000000
[  839.034079] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  839.034079] CR2: 00007efd2fedb000 CR3: 000000005f8b0000 CR4: 00000000000006e0
[  839.034079] Stack:
[  839.034079]  0000000000000000 0000000000000000 ffff880041023e80 ffff880011b74780
[  839.034079]  ffff880011b74840 ffff880011b47868 ffff880041023e18 ffffffffc072bfe1
[  839.034079]  0000000000001847 ffff880041023e80 ffff880011b74780 0000000000000408
[  839.034079] Call Trace:
[  839.034079]  [<ffffffffc072bfe1>] ovl_setattr+0x81/0xc0 [overlay]
[  839.034079]  [<ffffffff811dc955>] notify_change+0x245/0x360
[  839.034079]  [<ffffffff811beec9>] chown_common.isra.13+0x119/0x1a0
[  839.034079]  [<ffffffff811d0092>] ? getname_flags+0x72/0x1f0
[  839.034079]  [<ffffffff811e04c6>] ? __mnt_want_write+0x56/0x60
[  839.034079]  [<ffffffff811c0247>] SyS_chown+0x87/0xe0
[  839.034079]  [<ffffffff81677b5b>] entry_SYSCALL_64_fastpath+0x16/0x6a
[  839.034079] Code: 89 e6 48 89 df e8 53 3f 02 00 e9 14 fe ff ff 83 c8 01 41 89 04 24 89 c3 41 0f b7 17 e9 ed fe ff ff b8 ff ff ff ff e9 fa fd ff ff <0f> 0b 48 3b 50 30 0f 85 84 fe ff ff e9 1d ff ff ff 4c 89 e6 4c 
[  839.034079] RIP  [<ffffffff811dca0e>] notify_change+0x2fe/0x360
[  839.034079]  RSP <ffff880041023db8>
[  839.193991] ---[ end trace c6d40fb3d87c9ced ]---
[  839.903651] ------------[ cut here ]------------
[  839.904549] kernel BUG at fs/attr.c:238!
[  839.904549] invalid opcode: 0000 [#10] SMP 
[  839.904549] Modules linked in: overlay nls_utf8 cifs fscache autofs4 ipv6 cfg80211 rfkill fuse joydev hid_generic usbhid hid i2c_dev ppdev snd_hda_codec_generic vmwgfx kvm_amd ttm kvm drm_kms_helper drm snd_hda_intel psmouse evdev serio_raw fb_sys_fops syscopyarea sysfillrect irqbypass acpi_cpufreq snd_hda_codec i2c_piix4 sysimgblt i2c_core 8250_fintek tpm_tis snd_hda_core intel_agp snd_hwdep intel_gtt snd_pcm agpgart snd_timer uhci_hcd snd soundcore parport_pc parport ehci_pci ehci_hcd tpm button processor loop ext4 mbcache jbd2 virtio_net virtio_pci virtio_balloon virtio_blk virtio virtio_ring
[  839.904549] CPU: 1 PID: 24937 Comm: tar-1.13 Tainted: G      D         4.4.16 #1
[  839.904549] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[  839.904549] task: ffff88005f8ba100 ti: ffff8800412c4000 task.ti: ffff8800412c4000
[  839.904549] RIP: 0010:[<ffffffff811dca0e>]  [<ffffffff811dca0e>] notify_change+0x2fe/0x360
[  839.904549] RSP: 0018:ffff8800412c7db8  EFLAGS: 00010202
[  839.904549] RAX: 00000000579b6dfc RBX: 0000000000001847 RCX: 000000000000001c
[  839.904549] RDX: 0000000037685fac RSI: 0000000037685fac RDI: 00000000579b6dfc
[  839.904549] RBP: ffff8800412c7de8 R08: 00000000ffffffc3 R09: 0000000000000000
[  839.904549] R10: ffffea000104d000 R11: ffff88005333c278 R12: ffff8800412c7e80
[  839.904549] R13: ffff88004c69dcc0 R14: 00000000000089ed R15: ffff880011b6cd78
[  839.904549] FS:  00007ff1ccc9d700(0000) GS:ffff88007f500000(0000) knlGS:0000000000000000
[  839.904549] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  839.904549] CR2: 0000000002460118 CR3: 0000000041292000 CR4: 00000000000006e0
[  839.904549] Stack:
[  839.904549]  0000000000000000 0000000000000000 ffff8800412c7e80 ffff88005333c240
[  839.904549]  ffff88004c69dcc0 ffff880011b466a8 ffff8800412c7e18 ffffffffc072bfe1
[  839.904549]  0000000000001847 ffff8800412c7e80 ffff88005333c240 0000000000000008
[  839.904549] Call Trace:
[  839.904549]  [<ffffffffc072bfe1>] ovl_setattr+0x81/0xc0 [overlay]
[  839.904549]  [<ffffffff811dc955>] notify_change+0x245/0x360
[  839.904549]  [<ffffffff811beec9>] chown_common.isra.13+0x119/0x1a0
[  839.904549]  [<ffffffff811d0092>] ? getname_flags+0x72/0x1f0
[  839.904549]  [<ffffffff811e04c6>] ? __mnt_want_write+0x56/0x60
[  839.904549]  [<ffffffff811c0247>] SyS_chown+0x87/0xe0
[  839.904549]  [<ffffffff81677b5b>] entry_SYSCALL_64_fastpath+0x16/0x6a
[  839.904549] Code: 89 e6 48 89 df e8 53 3f 02 00 e9 14 fe ff ff 83 c8 01 41 89 04 24 89 c3 41 0f b7 17 e9 ed fe ff ff b8 ff ff ff ff e9 fa fd ff ff <0f> 0b 48 3b 50 30 0f 85 84 fe ff ff e9 1d ff ff ff 4c 89 e6 4c 
[  839.904549] RIP  [<ffffffff811dca0e>] notify_change+0x2fe/0x360
[  839.904549]  RSP <ffff8800412c7db8>
[  840.044063] ---[ end trace c6d40fb3d87c9cee ]---

Actually these are several occurrences shortly after one another. There's a "squashfs" command at the end of the package installation sequence but that stalls forever. As a result, we can not create Live ISO images of Slackware-current at the moment.
Comment 1 Eric Hameleers 2016-07-29 22:40:24 UTC
More information: the same bug is triggered in a VMWare Player instance as well as on real hardware.

There are several - but not all - packages in Slackware that trigger the bug. Two of them are the 'dcron' and the 'floppy' package. I tested the 'floppy' package installation by running "sh -x /sbin/installpkg /path/to/floppy*.t?z".

The bug is triggered by this line in Slackware's "/sbin/installpkg" program which is meant to extract the Slackware package (a simple compressed tarball) and add a listing of the package's content to the package database (in Slackware the package database entry is a simple text file in the directory /var/log/packages):

( cd $ROOT/ ; $packagecompression -dc | $TAR -xlUpvf - | sort ) < $package >> $TMP/$shortname 2> /dev/null

Looking at the package database file, the last file to be written to the file before the kernel bug triggered, is "usr/bin/fdmount" which is setuid root:

-rwsr-x--- 1 root floppy 23200 Aug  2  2013 /usr/bin/fdmount*

This is also the last file that was actually extracted to the filesystem, and it does have the setuid bit set. 

Judging by the mention of "ovl_setattr" in the trace, it is possible that the setuid bit is the troublesome bit. The other package I tested, 'dcron', also contains a setuid program:

-rws--x--x 1 root root 14712 May 10 20:02 /usr/bin/crontab

And in this case as well, it is the last file from that package which is written to the filesystem when the kernel bug is triggered. I verified this by comparing an unsorted listing of the tarball with the (sorted) package listing in /var/log/packages/ .
Comment 2 Eric Hameleers 2016-07-30 15:42:40 UTC
Here is a post on the Slackware forum at LQ from someone who thinks he may have found the culprit : http://www.linuxquestions.org/questions/slackware-14/slackware64-live-14-2-a-4175585764/#post5583302
It's this modification: https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/diff/fs/overlayfs/inode.c?id=v4.4.16&id2=v4.4.15
Comment 3 Konrad J Hambrick 2016-07-30 16:07:09 UTC
Thanks Eric.

I just this morning created a login here to post my $0.02 here.

It looks like the mode &= S_IFMT line needs to be modified and a tad and then put it back where it was in fs/overlayfs/inode.c, upstream of the call to get_next_ino() at line 415 ...

? 'modified a tad' == maybe `or-in` another mode flag or two ?


HTH.

-- kjh
Comment 4 Robby Workman 2016-07-31 03:41:03 UTC
Confirmed here on 4.4.16, and luckily, there were only three ovl commits between 4.4.15 and 4.4.16, so this was pretty easy to narrow down the offending commit. It's this one:

commit c12dada5f28a4894b81df2666c060f5cecc02cf9
Author: Vivek Goyal <vgoyal@redhat.com>
Date:   Fri Jul 1 16:34:25 2016 -0400

    ovl: Copy up underlying inode's ->i_mode to overlay inode
    
    commit 07a2daab49c549a37b5b744cbebb6e3f445f12bc upstream.

I don't see why though :/

If you wish, once this is solved, a bisected-by tag is fine - use rworkman@slackware.com for the mail.

We'll be happy to test potential solutions.
Comment 5 Eric Schultz 2016-07-31 13:18:02 UTC
Confirmed here on 4.4.16.  I found the root cause though which has nothing to do with modifying any of the three ovl commits that went in to 4.4.16.  The offending commit in 4.4.16 (c12dada5f28a4894b81df2666c060f5cecc02cf9) requires another commit that *wasn't* ported in to 4.4.16:

    commit b99c2d913810e56682a538c9f2394d76fca808f8

    ovl: handle ATTR_KILL*
    Before 4bacc9c9234c ("overlayfs: Make f_path...") file->f_path pointed to
    the underlying file, hence suid/sgid removal on write worked fine.

    After that patch file->f_path pointed to the overlay file, and the file
    mode bits weren't copied to overlay_inode->i_mode.  So the suid/sgid
    removal simply stopped working.
 
    The fix is to copy the mode bits, but then ovl_setattr() needs to clear
    ATTR_MODE to avoid the BUG() in notify_change().  So do this first, then in
    the next patch copy the mode.



Kernel maintainer (greg) will have to port this upstream commit to 4.4.y branch.  I manually did and it fixed this issue.
Comment 6 Eric Hameleers 2016-07-31 15:49:56 UTC
I can confirm that this patch which I backported from the 4.6 kernel (the b99c2d913810e56682a538c9f2394d76fca808f8 commit above) fixes my issue with the 4.4.16 kernel:


# --- cut here ---
--- a/fs/overlayfs/inode.c      2016-07-31 15:41:55.613057608 +0200
+++ b/fs/overlayfs/inode.c      2016-07-31 15:46:24.498060788 +0200
@@ -63,6 +63,9 @@
        if (!err) {
                upperdentry = ovl_dentry_upper(dentry);
 
+               if (attr->ia_valid & (ATTR_KILL_SUID|ATTR_KILL_SGID))
+                       attr->ia_valid &= ~ATTR_MODE;
+
                mutex_lock(&upperdentry->d_inode->i_mutex);
                err = notify_change(upperdentry, attr, NULL);
                if (!err)
# --- cut here ---
Comment 7 Eric Hameleers 2016-07-31 15:52:40 UTC
Created attachment 227011 [details]
Patch fixes the reported issue.

This is the same patch I referred to in my earlier comment. This patch fixes my issue.
Comment 8 Konrad J Hambrick 2016-08-01 19:43:41 UTC
Eric Schultz --

As I said over on my LQ post, I don't understand the Kernel, but being curious ... 

Do the two commits from 4.6.y ( below ) appear to also belong in the 4.4.y tree along with commit: b99c2d913810e56682a538c9f2394d76fca808f8 / ovl: handle ATTR_KILL* ?

The changes are both isolated to fs/overlayfs/super.c function ovl_fill_super().

And they would seem to be applicable to 4.4.y ...

Thanks for your time !

-- kjh

commit 429cc19dbdce4568f4d3f0da06596c1d4d559f24
Author: Vivek Goyal <vgoyal@redhat.com>
Date:   Fri Jul 1 10:02:44 2016 -0400

    ovl: warn instead of error if d_type is not supported
    
    commit e7c0b5991dd1be7b6f6dc2b54a15a0f47b64b007 upstream.
    
    overlay needs underlying fs to support d_type. Recently I put in a
    patch in to detect this condition and started failing mount if
    underlying fs did not support d_type.
    
    But this breaks existing configurations over kernel upgrade. Those who
    are running docker (partially broken configuration) with xfs not
    supporting d_type, are surprised that after kernel upgrade docker does
    not run anymore.
    
    https://github.com/docker/docker/issues/22937#issuecomment-229881315
    
    So instead of erroring out, detect broken configuration and warn
    about it. This should allow existing docker setups to continue
    working after kernel upgrade.
    
    Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
    Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
    Fixes: 45aebeaf4f67 ("ovl: Ensure upper filesystem supports d_type")
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 1cc1665689afab53364915003a945779589356b8
Author: Vivek Goyal <vgoyal@redhat.com>
Date:   Fri May 20 09:04:26 2016 -0400

    ovl: Do d_type check only if work dir creation was successful
    
    commit 21765194cecf2e4514ad75244df459f188140a0f upstream.
    
    d_type check requires successful creation of workdir as iterates
    through work dir and expects work dir to be present in it. If that's
    not the case, this check will always return d_type not supported even
    if underlying filesystem might be supporting it.
    
    So don't do this check if work dir creation failed in previous step.
    
    Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
    Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Comment 9 Eric Schultz 2016-08-03 17:24:58 UTC
Konrad Hambrick --

Those two additional commits you mentioned in 4.6.y are not applicable to 4.4.y -- that is, the d_type check(s) in overlayfs were just introduced in 4.6.

Funny thing is I tried to upgrade to 4.6 over a month ago and couldn't mount a overlayfs path with a reiserfs filesystem with the error that d_type wasn't supported.  That commit 429cc19dbdce4568f4d3f0da06596c1d4d559f24 (ovl: warn instead of error if d_type is not supported) would have probably helped me if it existed back then.  I'm still on 4.4 today but have switched to BTRFS and will jump to 4.7 soon.



Eric Hameleers --

Thanks for attaching that patch, that's exactly what I modified locally and verified working before I came here to post on my findings.  I shot a email to Greg before I posted here and he has accepted this patch and merged it in to 4.4.y this morning.

Note You need to log in before you can comment on or make changes to this bug.