[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <D666C431-DAD2-4189-9716-564602705D82@dubeyko.com>
Date: Tue, 7 May 2013 23:05:26 +0400
From: Vyacheslav Dubeyko <slava@...eyko.com>
To: Jiri Slaby <jslaby@...e.cz>
Cc: jirislaby@...il.com, linux-kernel@...r.kernel.org,
Jeff Mahoney <jeffm@...e.com>, linux-fsdevel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 07/15] hfs: avoid crash in hfs_bnode_create
On May 7, 2013, at 6:18 PM, Jiri Slaby wrote:
> From: Jeff Mahoney <jeffm@...e.com>
>
> Commit 634725a92938b0f282b17cec0b007dca77adebd2 removed the BUG_ON in
> hfs_bnode_create in hfsplus. This patch removes it from the hfs
> version and avoids an fsfuzzer crash.
>
> Signed-off-by: Jeff Mahoney <jeffm@...e.com>
> Acked-by: Jeff Mahoney <jeffm@...e.com>
> Signed-off-by: Jiri Slaby <jslaby@...e.cz>
> Cc: linux-fsdevel@...r.kernel.org
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> ---
> fs/hfs/bnode.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/fs/hfs/bnode.c b/fs/hfs/bnode.c
> index f3b1a15..6d435c2 100644
> --- a/fs/hfs/bnode.c
> +++ b/fs/hfs/bnode.c
> @@ -415,7 +415,11 @@ struct hfs_bnode *hfs_bnode_create(struct hfs_btree *tree, u32 num)
> spin_lock(&tree->hash_lock);
> node = hfs_bnode_findhash(tree, num);
> spin_unlock(&tree->hash_lock);
> - BUG_ON(node);
> + if (node) {
> + printk(KERN_CRIT "new node %u already hashed?\n", num);
The error/debug subsystem of HFS/HFS+ was reworked by Joe Perches, recently. Please, change printk() on pr_crit().
Thanks,
Vyacheslav Dubeyko.
> + WARN_ON(1);
> + return node;
> + }
> node = __hfs_bnode_create(tree, num);
> if (!node)
> return ERR_PTR(-ENOMEM);
> --
> 1.8.2.1
>
> --
> 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/
--
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