+ befs-check-return-of-sb_min_blocksize.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: befs: check return of sb_min_blocksize
has been added to the -mm tree.  Its filename is
     befs-check-return-of-sb_min_blocksize.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/befs-check-return-of-sb_min_blocksize.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/befs-check-return-of-sb_min_blocksize.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Luis de Bethencourt <luisbg@xxxxxxxxxxxxxxx>
Subject: befs: check return of sb_min_blocksize

Confirm sb_min_blocksize() succeeded before continuing.

Link: http://lkml.kernel.org/r/1465700235-22881-1-git-send-email-luisbg@xxxxxxxxxxxxxxx
Signed-off-by: Luis de Bethencourt <luisbg@xxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/befs/linuxvfs.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff -puN fs/befs/linuxvfs.c~befs-check-return-of-sb_min_blocksize fs/befs/linuxvfs.c
--- a/fs/befs/linuxvfs.c~befs-check-return-of-sb_min_blocksize
+++ a/fs/befs/linuxvfs.c
@@ -756,6 +756,7 @@ befs_fill_super(struct super_block *sb,
 	long ret = -EINVAL;
 	const unsigned long sb_block = 0;
 	const off_t x86_sb_off = 512;
+	int blocksize;
 
 	save_mount_options(sb, data);
 
@@ -788,7 +789,11 @@ befs_fill_super(struct super_block *sb,
 	 * least 1k to get the second 512 bytes of the volume.
 	 * -WD 10-26-01
 	 */ 
-	sb_min_blocksize(sb, 1024);
+	blocksize = sb_min_blocksize(sb, 1024);
+	if (!blocksize) {
+		befs_error(sb, "unable to set blocksize");
+		goto unacquire_priv_sbp;
+	}
 
 	if (!(bh = sb_bread(sb, sb_block))) {
 		if (!silent)
_

Patches currently in -mm which might be from luisbg@xxxxxxxxxxxxxxx are

befs-check-return-of-sb_min_blocksize.patch
befs-fix-function-name-in-documentation.patch
befs-remove-unused-functions.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux