linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH stable request 3.10] vfs: Remove incorrect debugging WARN in prepend_path
@ 2015-09-28 23:17 Vinson Lee
  2015-09-28 23:17 ` [PATCH] " Vinson Lee
  0 siblings, 1 reply; 3+ messages in thread
From: Vinson Lee @ 2015-09-28 23:17 UTC (permalink / raw)
  To: Alexander Viro, Eric W. Biederman, Ivan Delalande, Omar Sandoval,
	stable
  Cc: linux-fsdevel, Vinson Lee

From: Vinson Lee <vlee@twitter.com>

Hi.

Please backport upstream 4.2 commit 93e3bce6287e1fb3e60d3324ed08555b5bbafa89
("vfs: Remove incorrect debugging WARN in prepend_path") to stable kernel 3.10.

This patch has already been backported to stable kernels 3.12, 3.13, 3.14,
3.16, 3.18, 4.0, and 4.1.

The upstream patch does not apply cleanly and a backport is provided.

This patch fixes 3.13 commit f48cfddc6729e
("vfs: In d_path don't call d_dname on a mount point"), but this patch was
itself was backported in 3.10.28.

This patch addresses this warning seen in 3.10.76.

------------[ cut here ]------------
WARNING: at fs/dcache.c:2576 prepend_path+0x12b/0x17c()
Root dentry has weird name <>
Modules linked in: sch_fq_codel sch_htb cls_basic act_mirred cls_u32 veth sch_ingress netconsole configfs ipv6 dm_multipath scsi_dh video sbs sbshc hed acpi_pad a
 parport_pc lp parport tcp_diag inet_diag ipmi_si ipmi_devintf ipmi_msghandler dell_rbu sg iTCO_wdt iTCO_vendor_support dcdbas igb i2c_algo_bit ptp pps_core i7cor
ioatdma i2c_i801 shpchp i2c_core lpc_ich microcode dca mfd_core freq_table mperf ahci libahci libata sd_mod scsi_mod
CPU: 9 PID: 13242 Comm: lsof Tainted: G      D W    3.10.76 #1
 0000000000000000 ffff880b28ef3da0 ffffffff8146857f ffff880b28ef3dd8
 ffffffff8103cc01 ffff880b28ef3de8 ffff88060275fa20 ffff8803d4dbb740
 ffff88060275fa00 0000000000000000 ffff880b28ef3e38 ffffffff8103cc65
Call Trace:
 [<ffffffff8146857f>] dump_stack+0x19/0x1b
 [<ffffffff8103cc01>] warn_slowpath_common+0x65/0x7d
 [<ffffffff8103cc65>] warn_slowpath_fmt+0x4c/0x4e
 [<ffffffff8113dd5b>] prepend_path+0x12b/0x17c
 [<ffffffff8113de85>] d_path+0xd9/0x139
 [<ffffffff8117c35a>] proc_pid_readlink+0x6e/0xd9
 [<ffffffff81131202>] SyS_readlinkat+0x93/0xdc
 [<ffffffff81131266>] SyS_readlink+0x1b/0x1d
 [<ffffffff81473262>] system_call_fastpath+0x16/0x1b
---[ end trace a4b19d6c8a8b2eec ]---

Cheers,
Vinson

Eric W. Biederman (1):
  vfs: Remove incorrect debugging WARN in prepend_path

 fs/dcache.c |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)


^ permalink raw reply	[flat|nested] 3+ messages in thread
* Warning: empty root dentry name after lazy mount removal
@ 2015-05-15 18:58 Ivan Delalande
  2015-05-20 10:05 ` Omar Sandoval
  0 siblings, 1 reply; 3+ messages in thread
From: Ivan Delalande @ 2015-05-15 18:58 UTC (permalink / raw)
  To: Eric W. Biederman, Al Viro; +Cc: linux-fsdevel

Hi,

Since commit 8ed936b "vfs: Lazily remove mounts on unlinked files and
directories.", I’m seeing a new warning from prepend_path() at
fs/dcache.c:2937 saying:

	Root dentry has weird name <>

Our particular occurrence happens because we are using an older version
of iproute (< v3.10, commit bcb9d40, but this also works with the master
and just reverting that commit), and the following scenario:

	term1# ip netns add foo
	term1# ip netns exec foo sh
	term1# ls -l /proc/self/fd/4
	lr-x------ 1 root root 64 May 15 11:02 /proc/self/fd/4 -> /var/run/netns/foo
	term2# ip netns del foo
	term1# ls -l /proc/self/fd/4
	[dmesg] WARNING: [...]
	[dmesg] Root dentry has weird name <>
	lr-x------ 1 root root 64 May 15 11:04 /proc/self/fd/4 -> /

Relevant moutinfo chunks before the `ip netns del`:

	29 0 8:2 / / rw,relatime - ext4 /dev/sda2 rw,data=ordered
	82 29 0:3 / /var/run/netns/foo rw,nosuid,nodev,noexec,relatime - proc proc rw

What I could observe is that after the namespace deletion, that mount 82
get isolated (mnt->parent = mnt), and so prepend_path considers it as
the global root. But the name of that dentry has d_name.len == 0, which
triggers the WARN in that function.

I’m still struggling to understand all the relations between the VFS
structures and at which point they get initialized precisely. Do you
have any idea how to fix this problem?

Thanks,
-- 
Ivan "Colona" Delalande
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-28 23:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-28 23:17 [PATCH stable request 3.10] vfs: Remove incorrect debugging WARN in prepend_path Vinson Lee
2015-09-28 23:17 ` [PATCH] " Vinson Lee
  -- strict thread matches above, loose matches on Subject: below --
2015-05-15 18:58 Warning: empty root dentry name after lazy mount removal Ivan Delalande
2015-05-20 10:05 ` Omar Sandoval
2015-05-20 22:05   ` [PATCH] vfs: Fix, simpliy and stop using d_dname for the /proc/*/ns/* files Eric W. Biederman
2015-05-20 23:23     ` Al Viro
2015-06-03 20:51       ` Ivan Delalande
2015-06-06 19:27         ` Eric W. Biederman
2015-06-06 19:30           ` [PATCH] vfs: Remove incorrect debugging WARN in prepend_path Eric W. Biederman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).