aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfs/super.c
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /fs/hfs/super.c
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'fs/hfs/super.c')
-rw-r--r--fs/hfs/super.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/hfs/super.c b/fs/hfs/super.c
index f7fcbe49da72..0a81eb7111f3 100644
--- a/fs/hfs/super.c
+++ b/fs/hfs/super.c
@@ -19,6 +19,7 @@
19#include <linux/nls.h> 19#include <linux/nls.h>
20#include <linux/parser.h> 20#include <linux/parser.h>
21#include <linux/seq_file.h> 21#include <linux/seq_file.h>
22#include <linux/slab.h>
22#include <linux/smp_lock.h> 23#include <linux/smp_lock.h>
23#include <linux/vfs.h> 24#include <linux/vfs.h>
24 25
@@ -409,8 +410,13 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent)
409 /* try to get the root inode */ 410 /* try to get the root inode */
410 hfs_find_init(HFS_SB(sb)->cat_tree, &fd); 411 hfs_find_init(HFS_SB(sb)->cat_tree, &fd);
411 res = hfs_cat_find_brec(sb, HFS_ROOT_CNID, &fd); 412 res = hfs_cat_find_brec(sb, HFS_ROOT_CNID, &fd);
412 if (!res) 413 if (!res) {
414 if (fd.entrylength > sizeof(rec) || fd.entrylength < 0) {
415 res = -EIO;
416 goto bail;
417 }
413 hfs_bnode_read(fd.bnode, &rec, fd.entryoffset, fd.entrylength); 418 hfs_bnode_read(fd.bnode, &rec, fd.entryoffset, fd.entrylength);
419 }
414 if (res) { 420 if (res) {
415 hfs_find_exit(&fd); 421 hfs_find_exit(&fd);
416 goto bail_no_root; 422 goto bail_no_root;