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]
Date:   Fri, 21 Oct 2016 23:31:18 +0200
From:   "Rafael J. Wysocki" <rjw@...ysocki.net>
To:     Hoan Tran <hotran@....com>
Cc:     "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        Len Brown <lenb@...nel.org>,
        Robert Moore <robert.moore@...el.com>,
        Prakash Prashanth <pprakash@...eaurora.org>,
        linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
        lho@....com, Duc Dang <dhdang@....com>, devel@...ica.org
Subject: Re: [PATCH] mailbox: PCC: Fix return value of pcc_mbox_request_channel()

On Friday, October 14, 2016 04:20:21 PM Hoan Tran wrote:
> When CONFIG_PCC is disabled, pcc_mbox_request_channel() needs to
> return ERR_PTR(-ENODEV), not a NULL pointer, as the callers of
> this function use IS_ERR() to check for error code.
> 
> Signed-off-by: Duc Dang <dhdang@....com>
> Signed-off-by: Hoan Tran <hotran@....com>
> ---
>  include/acpi/pcc.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/acpi/pcc.h b/include/acpi/pcc.h
> index 17a940a..8caa79c 100644
> --- a/include/acpi/pcc.h
> +++ b/include/acpi/pcc.h
> @@ -21,7 +21,7 @@ extern struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *cl,
>  static inline struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *cl,
>  							 int subspace_id)
>  {
> -	return NULL;
> +	return ERR_PTR(-ENODEV);
>  }
>  static inline void pcc_mbox_free_channel(struct mbox_chan *chan) { }
>  #endif
> 

Applied.

Thanks,
Rafael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ