Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3429092imu; Sun, 11 Nov 2018 14:54:38 -0800 (PST) X-Google-Smtp-Source: AJdET5c4tugG5wGVoKowy/GzvV1OwxgkXCe7zgJdEasmDvT3ALNd4xpoEKcfacAOLKD91JA25IaQ X-Received: by 2002:a17:902:30f:: with SMTP id 15-v6mr17848453pld.155.1541976878327; Sun, 11 Nov 2018 14:54:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541976878; cv=none; d=google.com; s=arc-20160816; b=R2CVBuIkRPea/miX3MDJBplFhq+TbO1oB+qmOg7sNw3mYwkN26mw+xVuxTDrL9RkUh qSz5UXaJYq2Pp7Gq3TUx4dBwUDgPEk4BvugozdR+kFaVge+jP/jZH33iPsi0mBjaPnjZ dCt0RrL5okp5VfwuqrtZ2zX2OVivQETH0hKU03tWPLNF0mwElsePd+VVovVYwZdvZWap 8pjky2PNOaBOHEv//RDShYPhuXhCzJdPla37/NrtxGuObGAb6fGrU7iwaB4F4rQlXZK5 qcSflfs1YlqFBrEROH5J9Z6MT+BBwZEeJ9Tfysok33pqNaoPHcmRYsHSvgS2jwki5Pmo Hp8w== 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=o3Q4iKjmaVxOWErO6JBWP0RKLkC6+VZJV//COqj08gI=; b=HfC+LJLAtaX2EQ6iYugL0/ccAJJWXMyNJhCbYQq6i0+hhp9cJyPu3DICdT5TpCn6wd O+GZokGK1M/vv98dCMBr8ai/aPrwQaS7GJdWYAiTbzzqM78govujmVXA/JGbfiKS+2Dj j1AZBqGqrL55waIx7RfD/XM3oaoWT2AGvruVxLpyd+viwZjlcWnvLgzmtxE/+dCkLH8V WU2rrOWAyTd+ErMCH5pWgYld2FuXTd2diyTB3uOTihdzxcADpOYB/fkBDnfOwJU/91e1 yHhc3ulhwKtGM3TsiZn2mlUVDzPvv676C4T4j/v+lCFdVFOS1JYXE04ajURsNc2gdeoC L4HA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cRBaVdbl; 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 u8-v6si14501074pgl.59.2018.11.11.14.54.23; Sun, 11 Nov 2018 14:54:38 -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=cRBaVdbl; 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 S2404141AbeKLIoH (ORCPT + 99 others); Mon, 12 Nov 2018 03:44:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:54772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404000AbeKLIW6 (ORCPT ); Mon, 12 Nov 2018 03:22:58 -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 D3B2E223C8; Sun, 11 Nov 2018 22:33:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975580; bh=R8EIzeqfEUveB8Abu+ZYsxTAOqzn7xVpRTw+DeawsMU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cRBaVdbl82fOJ8CabjzhdFVDU2dznrqqrsh7UepWnBgM2mrJ0H+sELA52hOtMOWDC zWzqRh/wMPMVB4B46x0gRYY/NkiPmGj2fjZbZC98CtAcKs3K4y3xtaAfPduyRz9Bn9 PHOUX1KScu2Sni//Pg3NRfuC28b9tiDPC9PAygr4= 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.14 171/222] nfsd: Fix an Oops in free_session() Date: Sun, 11 Nov 2018 14:24:28 -0800 Message-Id: <20181111221702.501633059@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@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.14-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 @@ -1040,7 +1040,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);