Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3474109imu; Sun, 11 Nov 2018 15:56:31 -0800 (PST) X-Google-Smtp-Source: AJdET5c73+u71dJcrSfKNjmjpUtkn/65ySx0AzwyhsT7aBXdNK2diKhn4uBKBBelDWvkm+JxFXP3 X-Received: by 2002:a62:83c2:: with SMTP id h185-v6mr17766364pfe.187.1541980591811; Sun, 11 Nov 2018 15:56:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541980591; cv=none; d=google.com; s=arc-20160816; b=SXD/W2gzDPj3Z+ExSAlLXvZGHp2jV4H/Yu3duYV+R2FUsXALD9wp8md1kP3znqmaSx sTeLmDk5xHvlFkdjISejlKCfKY2XS+TiIm7HYpcz5R812vFQxobCOUYGBN7Ol0mGj2Fu h+/6LtCO6n8cPB2yzAPXoD8pLHo0U+eiK7ABQ6yXVQNq51d1SyBYbhEzFYytPpFWPUYd oPNw7G9teEKZeEYAaugQB4ERFgVRNEgelcZxXn3+WAtCFkYg5j7aUO/L3lEQJfPeyxug 9KvA1r9AXTnwDQeZZGkp83we7nUjmcCIldsWALc/TWy4VspsMEY+ozjw7doJyQv+0CIW iRmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4l8Da2ERQ0KDn4oGajdO+AqvGxKCK0jsn9v4i7QkMtE=; b=nvosljrTZthJQcoOpd9YGrnzlXxOtciUHKthIgXDfvI4bQjf/Iwc5mv92gugKRcBT2 pXNaaSx54vw2xASIMo/1m5KpNAx/QlibUy0WgwqTSWPk1gesmy3BRxzKk54//rkHadL2 YaV/jp01jNfJ0MEseBRuqFhj1FZU9aoLL7lvoURJ2YY8UM8UrF5+6+l1hhYoZ7b047jw +iv/mpis9a/WlXq5qcD2bb5WRpBUPvkjwM3hbzQhPyb4Ya4PB1w5M4pA7J5qGzYtTwKZ U7UvQxQ6Une14RFr4dQI6JEaVBJhzj6xL1NBD00E9BwobTaC003UnRDOHsuqWpBoRpwe JO/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ojoUtQbe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r28si12490188pgm.317.2018.11.11.15.56.16; Sun, 11 Nov 2018 15:56:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ojoUtQbe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732855AbeKLJpI (ORCPT + 99 others); Mon, 12 Nov 2018 04:45:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:37238 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727280AbeKLISV (ORCPT ); Mon, 12 Nov 2018 03:18:21 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 704B8216FD; Sun, 11 Nov 2018 22:28:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975305; bh=dcT8qKemi0+dNr3xsG65RRlLyP0ycHHajuYnwNFGMjA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ojoUtQbeStNdINDDVaWzhs+piwzafrztZr0SWXPAtjne8EpZlUCHd5JLoHNEqu2XW pj53VN6D/+2nagosfYI1p+9PvOh5/aqTDOfxVv/4ai5PKBwyaWP0cnsmqT0I/ywAr8 trWTMltxCQe8I/ksOfJTLL47U7ewiV9Z9Utm9XRM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Trond Myklebust , "J. Bruce Fields" Subject: [PATCH 4.19 273/361] nfsd: Fix an Oops in free_session() Date: Sun, 11 Nov 2018 14:20:20 -0800 Message-Id: <20181111221655.188969839@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Trond Myklebust commit bb6ad5572c0022e17e846b382d7413cdcf8055be upstream. In call_xpt_users(), we delete the entry from the list, but we do not reinitialise it. This triggers the list poisoning when we later call unregister_xpt_user() in nfsd4_del_conns(). Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields Signed-off-by: Greg Kroah-Hartman --- net/sunrpc/svc_xprt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c @@ -989,7 +989,7 @@ static void call_xpt_users(struct svc_xp spin_lock(&xprt->xpt_lock); while (!list_empty(&xprt->xpt_users)) { u = list_first_entry(&xprt->xpt_users, struct svc_xpt_user, list); - list_del(&u->list); + list_del_init(&u->list); u->callback(u); } spin_unlock(&xprt->xpt_lock);