Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1438690

Re: [PATCH] Removing lots of IS_ERR_VALUE abuses and compilation warning.

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [PATCH] Removing lots of IS_ERR_VALUE abuses and compilation warning.
Date 2016-07-07 17:50 +0200
Message-ID <rSjIS-s9-31@gated-at.bofh.it> (permalink)
References <rSjfQ-g1-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thursday, July 7, 2016 8:42:16 PM CEST Arvind Yadav wrote:
>     Passing value in IS_ERR_VALUE() is wrong, as they
>     pass an 'int' into a function that takes an 'unsigned long'
>     argument. This happens to work because the type is sign-extended
>     on 64-bit architectures before it gets converted into an
>     unsigned type.
> 
>     Passing an 'unsigned short' or 'unsigned int'
>     argument into IS_ERR_VALUE() is guaranteed to be broken, as are
>     8-bit integers and types that are wider than 'unsigned long'.
> 
>     Any user will get compilation warning for that do not pass an
>     'unsigned long' argument.
> 
>     Commit '287980e49f; - This change is alreday fixes lots of other
>     worst abusers.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> 

Acked-by: Arnd Bergmann <arnd@arndb.de>

just notice about your submission that the changelog is whitespace
damaged, you probably got the leading whitespace when you pasted
a git log into the commit.

	Arnd

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] Removing lots of IS_ERR_VALUE abuses and compilation warning. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2016-07-07 17:20 +0200
  Re: [PATCH] Removing lots of IS_ERR_VALUE abuses and compilation warning. Arnd Bergmann <arnd@arndb.de> - 2016-07-07 17:50 +0200

csiph-web