Skip to contentSkip to conversation

Patch "proc: Fix unbalanced hard link numbers" has been added to the 4.11-stable tree

PATCH [email protected] 1 participant 1 message May 22, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

proc: Fix unbalanced hard link numbers

to the 4.11-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
proc-fix-unbalanced-hard-link-numbers.patch
and it can be found in the queue-4.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From d66bb1607e2d8d384e53f3d93db5c18483c8c4f7 Mon Sep 17 00:00:00 2001

From: Takashi Iwai <[email protected]>
Date: Fri, 28 Apr 2017 15:00:15 +0200
Subject: proc: Fix unbalanced hard link numbers

From: Takashi Iwai <[email protected]>

commit d66bb1607e2d8d384e53f3d93db5c18483c8c4f7 upstream.

proc_create_mount_point() forgot to increase the parent's nlink, and it resulted in unbalanced hard link numbers, e.g. /proc/fs shows one less than expected.

Fixes eb6d38d5427b ("proc: Allow creating permanently empty directories...")
---
 fs/proc/generic.c |    1 +
 1 file changed, 1 insertion(+)
fs/proc/generic.c +1 -0
@@ -472,6 +472,7 @@ struct proc_dir_entry *proc_create_mount
 		ent->data = NULL;
 		ent->proc_fops = NULL;
 		ent->proc_iops = NULL;
+		parent->nlink++;
 		if (proc_register(parent, ent) < 0) {
 			kfree(ent);
 			parent->nlink--;

Patches currently in stable-queue which might be from [email protected] are

queue-4.11/proc-fix-unbalanced-hard-link-numbers.patch queue-4.11/alsa-hda-fix-cpu-lockup-when-stopping-the-cmd-dmas.patch