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  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 Mar 2014 09:55:02 +0300
From:	Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
	Minchan Kim <minchan@...nel.org>,
	Nitin Gupta <ngupta@...are.org>, Arnd Bergmann <arnd@...db.de>,
	Jerome Marchand <jmarchan@...hat.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] zram: include err.h in zram_drv

On (03/20/14 14:44), Andrew Morton wrote:
> > zcomp returns error-valued pointer, also include err.h header
> > in zram_drv.
> > 
> > Per Arnd Bergmann:
> > The zram driver uses the ERR_PTR macro defined in <linux/err.h>
> > and relies on this header to be included implicitly through
> > other headers, which is not (always) the case on the ARM architecture.
> > 
> > ...
> >
> > --- a/drivers/block/zram/zram_drv.c
> > +++ b/drivers/block/zram/zram_drv.c
> > @@ -31,6 +31,7 @@
> >  #include <linux/slab.h>
> >  #include <linux/string.h>
> >  #include <linux/vmalloc.h>
> > +#include <linux/err.h>
> >  
> >  #include "zram_drv.h"
> 
> I can find no occurrence of ERR_PTR in any version of
> drivers/block/zram/zram_drv.c which I can find.
> 
> zram-return-error-valued-pointer-from-zcomp_create.patch adds IS_ERR to
> drivers/block/zram/zram_drv.c which is presumably what you meant.  
> 

yes. sorry for inconvenience.

> zram-return-error-valued-pointer-from-zcomp_create.patch also adds
> ERR_PTR() calls into drivers/block/zram/zcomp.c so that file should
> include err.h also.
> 

missing direct include of err.h in zcomp.h was reported and fixed by
Arnd Bergmann
https://lkml.org/lkml/2014/3/15/39


	-ss

> 
> Here's what I added, as
> zram-return-error-valued-pointer-from-zcomp_create-fix-2.patch
> 
> From: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
> Subject: zram: include err.h
> 
> [akpm@...ux-foundation.org: fix zcomp.h as well]
> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
> Reported-by: Arnd Bergmann <arnd@...db.de>
> Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
> ---
> 
>  drivers/block/zram/zcomp.c    |    1 +
>  drivers/block/zram/zram_drv.c |    1 +
>  2 files changed, 2 insertions(+)
> 
> diff -puN drivers/block/zram/zram_drv.c~zram-include-errh-in-zram_drv drivers/block/zram/zram_drv.c
> --- a/drivers/block/zram/zram_drv.c~zram-include-errh-in-zram_drv
> +++ a/drivers/block/zram/zram_drv.c
> @@ -31,6 +31,7 @@
>  #include <linux/slab.h>
>  #include <linux/string.h>
>  #include <linux/vmalloc.h>
> +#include <linux/err.h>
>  
>  #include "zram_drv.h"
>  
> diff -puN drivers/block/zram/zcomp.c~zram-include-errh-in-zram_drv drivers/block/zram/zcomp.c
> --- a/drivers/block/zram/zcomp.c~zram-include-errh-in-zram_drv
> +++ a/drivers/block/zram/zcomp.c
> @@ -9,6 +9,7 @@
>  
>  #include <linux/kernel.h>
>  #include <linux/string.h>
> +#include <linux/err.h>
>  #include <linux/slab.h>
>  #include <linux/wait.h>
>  #include <linux/sched.h>
> _
> 
--
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