Received: by 10.213.65.68 with SMTP id h4csp908563imn; Tue, 27 Mar 2018 11:00:32 -0700 (PDT) X-Google-Smtp-Source: AIpwx4//NtyLFFU75SoefhW7zpAPL1yeNJVLRj4FHdvjAYq9jF33wBV1y41XpZ+rBH6RIn2/A4CB X-Received: by 10.98.220.86 with SMTP id t83mr266554pfg.60.1522173632207; Tue, 27 Mar 2018 11:00:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522173632; cv=none; d=google.com; s=arc-20160816; b=hY7nHldAvXmS9Y8xG2XwAUB04M8bO0ZrmoHnUgOH/824cu9eTasrCWSC/4U1MCmHrl p/rAoeRteeJYCc81N5Ko6LdWW7Pwq1NSVDPm3YjN+UaeEjSt+8elFxJ1hAzQnRc11IlZ qxYurerIoPCSBfH6wDXh4bCXOr+IFqWChDFwJOrzyoIVRGZ99MxjbEofNhBSFDjXv9F5 Ds67XANLHcRNt5U9+hC73zv9t1VGPqLkDs3AEu6jMFb/7NeyPkcfOMFGeqWiX7rrLDUP VfRpHnbMDkxVBWHrF7RqwTcgCUp3wmhOi0e249O41aAc/uVVA3BjH+REfm6pDC4+s+Br kE+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=XwAYKaf6vYgFJ1wRyZfGjzFNZ7O2Pzo2aEJO+bJXQiM=; b=cNjKQkwQhllHYSJagG47gxU6Yc8zmmaskD4eAN10LT2Tk2U4I8cS6FZ76FyjD7WLxf HY+Q3/QEWxgnyaFMidRtFKrEJL01gPD5FMmtdy97BFgVQOGqAkmVaeNfKpU9HL0eT8hM /iqnpljm5pZAHsfzhSJLs2BFnH6QGLHwIet79H8gnms655X5ztQ7EOEX59U3uGgsMeuz sgEQeHbNr0r13h6T6VjFPuMyb+05tWXxWbFM27p+2fZ2lP2RZNyh+dt0s7mJ4pwHelpH K2sM3wj/KenYAuMSdwqQw09aRaIpAETaKmykePnXs2OQN1J8NXs2T/Jz3nPDMqy+p7sH gmLw== ARC-Authentication-Results: i=1; mx.google.com; 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 1-v6si1743642plj.275.2018.03.27.11.00.17; Tue, 27 Mar 2018 11:00:32 -0700 (PDT) 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; 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 S1753089AbeC0Qac (ORCPT + 99 others); Tue, 27 Mar 2018 12:30:32 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:41910 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753063AbeC0Qa1 (ORCPT ); Tue, 27 Mar 2018 12:30:27 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 045BB11CA; Tue, 27 Mar 2018 16:30:26 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peng Tao , Oleg Drokin , James Simmons , Nadav Amit , Andreas Dilger Subject: [PATCH 4.4 40/43] staging: lustre: ptlrpc: kfree used instead of kvfree Date: Tue, 27 Mar 2018 18:27:44 +0200 Message-Id: <20180327162718.644716725@linuxfoundation.org> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180327162716.407986916@linuxfoundation.org> References: <20180327162716.407986916@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Nadav Amit commit c3eec59659cf25916647d2178c541302bb4822ad upstream. rq_reqbuf is allocated using kvmalloc() but released in one occasion using kfree() instead of kvfree(). The issue was found using grep based on a similar bug. Fixes: d7e09d0397e8 ("add Lustre file system client support") Fixes: ee0ec1946ec2 ("lustre: ptlrpc: Replace uses of OBD_{ALLOC,FREE}_LARGE") Cc: Peng Tao Cc: Oleg Drokin Cc: James Simmons Signed-off-by: Nadav Amit Signed-off-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman --- drivers/staging/lustre/lustre/ptlrpc/sec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/staging/lustre/lustre/ptlrpc/sec.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec.c @@ -824,7 +824,7 @@ void sptlrpc_request_out_callback(struct if (req->rq_pool || !req->rq_reqbuf) return; - kfree(req->rq_reqbuf); + kvfree(req->rq_reqbuf); req->rq_reqbuf = NULL; req->rq_reqbuf_len = 0; }