From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752505AbdBMOCY (ORCPT ); Mon, 13 Feb 2017 09:02:24 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:35334 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751842AbdBMOCW (ORCPT ); Mon, 13 Feb 2017 09:02:22 -0500 Date: Mon, 13 Feb 2017 17:01:56 +0300 From: Dan Carpenter To: SF Markus Elfring Cc: linux-rdma@vger.kernel.org, Dennis Dalessandro , Doug Ledford , Hal Rosenstock , Mike Marciniszyn , Sean Hefty , LKML , kernel-janitors@vger.kernel.org Subject: Re: IB/hfi1: Use memdup_user() rather than duplicating its implementation in hfi1_user_sdma_process_request() Message-ID: <20170213140156.GD4162@mwanda> References: <8a997282-09c7-0f9f-645e-d7c6e8c79e67@users.sourceforge.net> <477c8499-93ad-253d-aa2b-8f209ecfad62@intel.com> <20170213105350.GA4108@mwanda> <4094dc04-bb2c-a74e-8d4d-8879ac4e7761@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4094dc04-bb2c-a74e-8d4d-8879ac4e7761@users.sourceforge.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 13, 2017 at 12:12:51PM +0100, SF Markus Elfring wrote: > >> Thanks for the patch, but this one is already taken care of along > >> with other similar uses of kmalloc/copy: > >> > >> http://marc.info/?l=linux-rdma&m=148656088729538&w=2 > >> > > > > Michael's patch doesn't change user_sdma_free_request() so it introduces > > a kfreeing an error pointer bug. > > Did you notice that another local variable “tmp” was introduced in the update step > “[PATCH 27/27] IB/hfi1: Code reuse with memdup_copy” so that > the mentioned function will usually get a null pointer after a failure there? > Ah right. Thanks. I missed that. regards, dan carpenter