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]
Message-Id: <20060928231033.ff2d022b.akpm@osdl.org>
Date:	Thu, 28 Sep 2006 23:10:33 -0700
From:	Andrew Morton <akpm@...l.org>
To:	"Zhang, Yanmin" <yanmin_zhang@...ux.intel.com>
Cc:	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Add flag __GFP_NOFAIL when allocating block

On Fri, 29 Sep 2006 09:53:33 +0800
"Zhang, Yanmin" <yanmin_zhang@...ux.intel.com> wrote:

> Function journal_write_metadata_buffer doesn't estimate the return
> value of jbd_slab_alloc. If the allocation fails, later jbd_slab_free
> or memcpy will cause kernel oops.
> 
> Add flag __GFP_NOFAIL when allocating block. The patch is against
> 2.6.18-mm1.
> 
> Signed-off-by: Zhang Yanmin <yanmin.zhang@...el.com>
> 
> ---
> 
> --- linux-2.6.18_mm1/fs/jbd/journal.c	2006-09-29 07:19:49.000000000 -0600
> +++ linux-2.6.18_mm1_fix/fs/jbd/journal.c	2006-09-30 03:01:38.000000000 -0600
> @@ -329,7 +329,7 @@ repeat:
>  		char *tmp;
>  
>  		jbd_unlock_bh_state(bh_in);
> -		tmp = jbd_slab_alloc(bh_in->b_size, GFP_NOFS);
> +		tmp = jbd_slab_alloc(bh_in->b_size, GFP_NOFS|__GFP_NOFAIL);

jbd_slab_alloc() does that internally.
-
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