vfs: Remove incorrect debugging WARN in prepend_path
Subsystems (2)
PATCH 1/1 vfs: Remove incorrect debugging WARN in prepend_path
From: Vinson Lee <[email protected]>
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(-)
PATCH 1/1 vfs: Remove incorrect debugging WARN in prepend_path
From: Eric W. Biederman <[email protected]>
commit 93e3bce6287e1fb3e60d3324ed08555b5bbafa89 upstream.
The warning message in prepend_path is unclear and outdated. It was added as a warning that the mechanism for generating names of pseudo files had been removed from prepend_path and d_dname should be used instead. Unfortunately the warning reads like a general warning, making it unclear what to do with it.
Remove the warning. The transition it was added to warn about is long over, and I added code several years ago which in rare cases causes the warning to fire on legitimate code, and the warning is now firing and scaring people for no good reason.
--- fs/dcache.c | 9 --------- 1 files changed, 0 insertions(+), 9 deletions(-)
fs/dcache.c +0 -9
@@ -2569,15 +2569,6 @@ static int prepend_path(const struct path *path,return error; global_root: -/* -* Filesystems needing to implement special "root names" -* should do so with ->d_dname() -*/ -if (IS_ROOT (dentry) && - (dentry->d_name.len !=1 || dentry->d_name.name[0 ] !='/' )) { -WARN (1 ,"Root dentry has weird name <%.*s>\n" , - (int ) dentry->d_name.len, dentry->d_name.name); - }if (!slash) error =prepend (buffer, buflen,"/" ,1 );if (!error)
Signature · 1 line
1.7.1