Received: by 10.213.65.68 with SMTP id h4csp898461imn; Tue, 27 Mar 2018 10:48:34 -0700 (PDT) X-Google-Smtp-Source: AIpwx48A9YDPrT3W2mf3WrVNaD5m8KMwfbY21qAb1Jf5Netr0NNZszV0CmOeWbxYpjOuO4J02mcE X-Received: by 10.101.74.193 with SMTP id c1mr196676pgu.116.1522172914629; Tue, 27 Mar 2018 10:48:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522172914; cv=none; d=google.com; s=arc-20160816; b=yrD+KtXI+sZvC2Rj+40sWGYq8FN+wGep2uQaQe/1BqPFtHz4yJ5rr3axkXGL36PlU9 4BPKplThuDzGy0oFqBRZwQ/hdZ75jaBknceCxn7i3C4CWkEsT36bFCTuDuCtXsZKfKNi 3uDZMCnKzhd/r5Fd2VvTp7mMQZ/wECPXEMRvmo1FevcrGrmVMT47IJ8zgJpzvrhJNbMe vI5lS/xTvjAIB0/+N51X5tGMLhngCLsuQ+MFPQCtGi8uJNwu4gViOsN37z6Izg8X3tqB qQhQ54TafVbta8+SIx0qtWUh3GFxF8K9cgAoyHJgGL/6medses8oyrWmCC+a7Debs0y1 AWww== 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=dNI2wgrMRyS5kKdCvRFagt9OIYYjdarg/U6zLVbXF10=; b=iusLyEyJrP9mIZsmLbELdtjQxzk4/81Gbn9HRjui5tHQbhUi59EBuA58tneo0ixRfJ 1xIZAzRkIQhlL7c2/eLaMwCiVXu1zyxh9hk3bxVQMqOo1gvLX0t9IFhm616HoQSGfZI9 WKhumxdy7Qumy2TYk+TRBB9UEkSe0Rrpoo1r1v2uGtTjshIi8C9uHLi3ILG1Fzs1ZwJo lm7f+ftaj3VhtrSmeOR+97WA+e68MFlaDenI36B0rx4eH947/IUM3d9t+blrpzdXrtvg /zkPzYPub/7impu+MmSIPdutPg4BMuxQaPJqw0PVfwd5LemU8a5mWqi/VedLW1hjrYw8 Asqg== 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 k2-v6si1661653plt.413.2018.03.27.10.48.20; Tue, 27 Mar 2018 10:48:34 -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 S1753836AbeC0QdE (ORCPT + 99 others); Tue, 27 Mar 2018 12:33:04 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:43696 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753766AbeC0QdC (ORCPT ); Tue, 27 Mar 2018 12:33:02 -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 A317C115B; Tue, 27 Mar 2018 16:33:01 +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.9 59/67] staging: lustre: ptlrpc: kfree used instead of kvfree Date: Tue, 27 Mar 2018 18:27:51 +0200 Message-Id: <20180327162730.846541999@linuxfoundation.org> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180327162726.702411083@linuxfoundation.org> References: <20180327162726.702411083@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.9-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 @@ -838,7 +838,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; }