From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Subject: Re: IB/hfi1: Use memdup_user() rather than duplicating its implementation in hfi1_user_sdma_process_request() Date: Mon, 13 Feb 2017 12:12:51 +0100 Message-ID: <4094dc04-bb2c-a74e-8d4d-8879ac4e7761@users.sourceforge.net> References: <8a997282-09c7-0f9f-645e-d7c6e8c79e67@users.sourceforge.net> <477c8499-93ad-253d-aa2b-8f209ecfad62@intel.com> <20170213105350.GA4108@mwanda> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <20170213105350.GA4108@mwanda> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Dan Carpenter , linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Dennis Dalessandro , Doug Ledford , Hal Rosenstock , Mike Marciniszyn , Sean Hefty , LKML , kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-rdma@vger.kernel.org >> 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? Regards, Markus -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html