From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753065AbdGKARZ convert rfc822-to-8bit (ORCPT ); Mon, 10 Jul 2017 20:17:25 -0400 Received: from hqemgate14.nvidia.com ([216.228.121.143]:8909 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750939AbdGKARY (ORCPT ); Mon, 10 Jul 2017 20:17:24 -0400 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 10 Jul 2017 17:17:24 -0700 Subject: Re: [HMM 12/15] mm/migrate: new memory migration helper for use with device memory v4 To: Jerome Glisse CC: "akpm@linux-foundation.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , John Hubbard , David Nellans , Mark Hairgrove , Sherry Cheung , Subhash Gutti References: <20170522165206.6284-1-jglisse@redhat.com> <20170522165206.6284-13-jglisse@redhat.com> <5f476e8c-8256-13a8-2228-a2b9e5650586@nvidia.com> <20170701005749.GA7232@redhat.com> <20170710234339.GA15226@redhat.com> From: Evgeny Baskakov Message-ID: <57146eb3-43bc-6e8b-4c8e-0632aa8ed577@nvidia.com> Date: Mon, 10 Jul 2017 17:17:23 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170710234339.GA15226@redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 8BIT Content-Language: en-US X-Originating-IP: [172.17.163.108] X-ClientProxiedBy: HQMAIL106.nvidia.com (172.18.146.12) To HQMAIL103.nvidia.com (172.20.187.11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/10/17 4:43 PM, Jerome Glisse wrote: > On Mon, Jul 10, 2017 at 03:59:37PM -0700, Evgeny Baskakov wrote: > ... > Horrible stupid bug in the code, most likely from cut and paste. Attached > patch should fix it. I don't know how long it took for you to trigger it. > > Jérôme Thanks, this indeed fixes the problem! Yes, it took a nightly run before it triggered. One a side note, should this "return NULL" be replaced with "return ERR_PTR(-ENOMEM)"? struct hmm_device *hmm_device_new(void *drvdata) { ... if (hmm_device->minor >= HMM_DEVICE_MAX) { spin_unlock(&hmm_device_lock); kfree(hmm_device); -> return NULL; } Thanks! Evgeny Baskakov NVIDIA