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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 29 Oct 2015 07:57:44 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	trivial@...nel.org
Cc:	linaro-kernel@...ts.linaro.org, linux-kernel@...r.kernel.org,
	akpm@...ux-foundation.org
Subject: Re: [PATCH V1 resend] err.h: add (missing) unlikely() to
 IS_ERR_OR_NULL()

On 13-10-15, 13:57, Viresh Kumar wrote:
> IS_ERR_VALUE() already contains it and so we need to add this only to
> the !ptr check. That will allow users of IS_ERR_OR_NULL(), to not add
> this compiler flag.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
> ---
> @Jiri: You have applied all other patches, but this one. Can you please
> apply this one as well, as all others were applied based on the
> assumption that this one is applied. :)
> 
>  include/linux/err.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/err.h b/include/linux/err.h
> index a729120644d5..56762ab41713 100644
> --- a/include/linux/err.h
> +++ b/include/linux/err.h
> @@ -37,7 +37,7 @@ static inline bool __must_check IS_ERR(__force const void *ptr)
>  
>  static inline bool __must_check IS_ERR_OR_NULL(__force const void *ptr)
>  {
> -	return !ptr || IS_ERR_VALUE((unsigned long)ptr);
> +	return unlikely(!ptr) || IS_ERR_VALUE((unsigned long)ptr);
>  }

Ping !!

-- 
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ