Received: by 10.213.65.68 with SMTP id h4csp871183imn; Tue, 27 Mar 2018 10:17:59 -0700 (PDT) X-Google-Smtp-Source: AIpwx48HX+OGCuFpxXkgI63+q0Sg6QrXA3Wx7bawwgEcxggeWkghJ6D14/FWPmDChdEj5zuaTU+B X-Received: by 10.99.173.7 with SMTP id g7mr130955pgf.170.1522171079771; Tue, 27 Mar 2018 10:17:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522171079; cv=none; d=google.com; s=arc-20160816; b=aGitntFJLDScqKrVOOmDDzNFLTKwF21zZE6mf61S49Tcn/XDGt9V4s8RsJ+2q2abOZ 7Ih4AQoWr3URkZuI/1OdqtPwtKZQpt4wV3MmgVFNijYJ1eKyqyDjQxkcsnmzI/KiVDnq 1R2NMz/bvAFX1/AmABXZ4GnUYmQUiFnyj3UUSjiuRJEP3djyS1y4Stm5O/lUxO4QN/0C TkYjwusAcPIokjsxAOt0J+5NgP74/eBjRHzeez6bVnUDRo4i/n8tNyvSL1ZdGOMDHwap pFztozCiffIabfxv/3RmQONuoaE4obL+7wjmaiY12wXzsxhKxU9xdXax6SaID7nglE/v 3VXQ== 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=Fq7ho4mvMrTmcqIoD7rts3hk/mbYXRLUO0LzkNcx9IE=; b=uhO2w4FRw8VPmxSw+RFhlWa18OuPdkwRP4e2cBsk3WfU9hpL1U0OjfPgZE53NF3he5 gp66PZStTKASnRHBCC5U31Uc5DAr5WpEbCcu9r/hu57qRSmQOwqB4YUmfJoyPYI7QviK cXB9CSRxTsJMa3dh924oL80jbHx+huI95gNbSt7rqKh0HYmbnLLiCiKHN3VKNYmn7IIc xQ1EEw+YmTCKq8HfNc4VuAL2aWbj2deNEsw2B9MYBc/P/6byKCS0AiNE9+1a9Dr6WdVV 80+Y3aoXWjxENRU00tVYbtsGpeaa2Ch93r5x0/eM+VCAYre/V57/pqOXeq3nQaUMZage nKLQ== 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 128si1121205pgh.189.2018.03.27.10.17.45; Tue, 27 Mar 2018 10:17:59 -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 S1753600AbeC0RQx (ORCPT + 99 others); Tue, 27 Mar 2018 13:16:53 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46856 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755266AbeC0Qik (ORCPT ); Tue, 27 Mar 2018 12:38:40 -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 B0A931034; Tue, 27 Mar 2018 16:38:39 +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.14 095/101] staging: lustre: ptlrpc: kfree used instead of kvfree Date: Tue, 27 Mar 2018 18:28:07 +0200 Message-Id: <20180327162755.855696211@linuxfoundation.org> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180327162749.993880276@linuxfoundation.org> References: <20180327162749.993880276@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.14-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 @@ -847,7 +847,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; }