From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:38318 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755118AbeBOIeK (ORCPT ); Thu, 15 Feb 2018 03:34:10 -0500 Subject: Patch "afs: Need to clear responded flag in addr cursor" has been added to the 4.15-stable tree To: dhowells@redhat.com, gregkh@linuxfoundation.org Cc: , From: Date: Thu, 15 Feb 2018 09:33:27 +0100 Message-ID: <15186836075670@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled afs: Need to clear responded flag in addr cursor 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-need-to-clear-responded-flag-in-addr-cursor.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 know about it. >>From 8305e579c653b127b292fcdce551e930f9560260 Mon Sep 17 00:00:00 2001 From: David Howells Date: Tue, 6 Feb 2018 06:26:30 +0000 Subject: afs: Need to clear responded flag in addr cursor From: David Howells commit 8305e579c653b127b292fcdce551e930f9560260 upstream. In afs_select_fileserver(), we need to clear the ->responded flag in the address list when reusing it. We should also clear it in afs_select_current_fileserver(). To this end, just memset() the object before initialising it. Fixes: d2ddc776a458 ("afs: Overhaul volume and server record caching and fileserver rotation") Signed-off-by: David Howells Signed-off-by: Greg Kroah-Hartman --- fs/afs/rotate.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) --- a/fs/afs/rotate.c +++ b/fs/afs/rotate.c @@ -383,6 +383,7 @@ use_server: afs_get_addrlist(alist); read_unlock(&server->fs_lock); + memset(&fc->ac, 0, sizeof(fc->ac)); /* Probe the current fileserver if we haven't done so yet. */ if (!test_bit(AFS_SERVER_FL_PROBED, &server->flags)) { @@ -397,11 +398,8 @@ use_server: else afs_put_addrlist(alist); - fc->ac.addr = NULL; fc->ac.start = READ_ONCE(alist->index); fc->ac.index = fc->ac.start; - fc->ac.error = 0; - fc->ac.begun = false; goto iterate_address; iterate_address: @@ -458,12 +456,10 @@ bool afs_select_current_fileserver(struc return false; } + memset(&fc->ac, 0, sizeof(fc->ac)); fc->ac.alist = alist; - fc->ac.addr = NULL; fc->ac.start = READ_ONCE(alist->index); fc->ac.index = fc->ac.start; - fc->ac.error = 0; - fc->ac.begun = false; goto iterate_address; case 0: 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