lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20181226222236.GA4931@redhat.com>
Date:   Wed, 26 Dec 2018 17:22:36 -0500
From:   Jerome Glisse <jglisse@...hat.com>
To:     Aditya Pakki <pakki001@....edu>
Cc:     kjlu@....edu, linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] hmm: Warn on devres_release failure

On Wed, Dec 26, 2018 at 12:09:04PM -0600, Aditya Pakki wrote:
> devres_release can return -ENOENT if the device is not freed. The fix
> throws a warning consistent with other invocations.
> 
> Signed-off-by: Aditya Pakki <pakki001@....edu>

Reviewed-by: Jérôme Glisse <jglisse@...hat.com>

> ---
>  mm/hmm.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/hmm.c b/mm/hmm.c
> index 90c34f3d1243..b06e3f092fbf 100644
> --- a/mm/hmm.c
> +++ b/mm/hmm.c
> @@ -1183,8 +1183,12 @@ static int hmm_devmem_match(struct device *dev, void *data, void *match_data)
>  
>  static void hmm_devmem_pages_remove(struct hmm_devmem *devmem)
>  {
> -	devres_release(devmem->device, &hmm_devmem_release,
> -		       &hmm_devmem_match, devmem->resource);
> +	int rc;
> +
> +	rc = devres_release(devmem->device, &hmm_devmem_release,
> +				&hmm_devmem_match, devmem->resource);
> +	if (rc)
> +		WARN_ON(rc);
>  }
>  
>  /*
> -- 
> 2.17.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ