Re: [HMM 12/15] mm/migrate: new memory migration helper for use with device memory v4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux