lkml.org 
[lkml]   [2014]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] regmap: fix possible ZERO_SIZE_PTR pointer dereferencing error.
On Sun, Sep 28, 2014 at 05:09:54PM +0800, Xiubo Li wrote:
> Since we cannot make sure the 'val_count' will always be none zero
> here, and then if it equals to zero, the kmemdup() will return
> ZERO_SIZE_PTR, which equals to ((void *)16).

Applied, thanks.

> diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
> index 455a877..3d93e38 100644
> --- a/drivers/base/regmap/regmap.c
> +++ b/drivers/base/regmap/regmap.c
> @@ -1716,6 +1716,9 @@ out:

Whatever you're using to generate the patches isn't annotating with the
function being changed like git normally does which isn't great for
working out what the best return value should be.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-09-28 13:01    [W:1.519 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site