All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "afs: Add missing afs_put_cell()" has been added to the 4.15-stable tree
@ 2018-02-15  8:33 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2018-02-15  8:33 UTC (permalink / raw)
  To: dhowells, gregkh; +Cc: stable, stable-commits


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

    afs: Add missing afs_put_cell()

to the 4.15-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:
     afs-add-missing-afs_put_cell.patch
and it can be found in the queue-4.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From e44150157f42219fa5c074588efdb31ccfb197fc Mon Sep 17 00:00:00 2001
From: David Howells <dhowells@redhat.com>
Date: Tue, 6 Feb 2018 09:26:27 +0000
Subject: afs: Add missing afs_put_cell()

From: David Howells <dhowells@redhat.com>

commit e44150157f42219fa5c074588efdb31ccfb197fc upstream.

afs_alloc_volume() needs to release the cell ref it obtained in the case of
an error.  Fix this by adding an afs_put_cell() call into the error path.

This can triggered when a lookup for a cell in a dynamic root or an
autocell mount returns an error whilst trying to look up the server (such
as ENOMEDIUM).  This results in an assertion failure oops when the module
is unloaded due to outstanding refs on a cell record.

Fixes: d2ddc776a458 ("afs: Overhaul volume and server record caching and fileserver rotation")
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/afs/volume.c |    1 +
 1 file changed, 1 insertion(+)

--- a/fs/afs/volume.c
+++ b/fs/afs/volume.c
@@ -102,6 +102,7 @@ static struct afs_volume *afs_alloc_volu
 error_2:
 	afs_put_serverlist(params->net, slist);
 error_1:
+	afs_put_cell(params->net, volume->cell);
 	kfree(volume);
 error_0:
 	return ERR_PTR(ret);


Patches currently in stable-queue which might be from dhowells@redhat.com are

queue-4.15/afs-fix-missing-cursor-clearance.patch
queue-4.15/afs-add-missing-afs_put_cell.patch
queue-4.15/afs-need-to-clear-responded-flag-in-addr-cursor.patch
queue-4.15/afs-fix-server-list-handling.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-02-15  8:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-15  8:33 Patch "afs: Add missing afs_put_cell()" has been added to the 4.15-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.