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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1204615263.23706.19.camel@sauron>
Date:	Tue, 04 Mar 2008 09:21:03 +0200
From:	Artem Bityutskiy <dedekind@...radead.org>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	LKML <linux-kernel@...r.kernel.org>
Subject: [GIT PULL] UBI fixes for 2.6.25-rc4

Hi Linus,

Please pull UBI fixes from 'for-linus' branch of

git://git.infradead.org/~dedekind/ubi-2.6.git for-linus

to receive the following updates:

 drivers/mtd/ubi/build.c |    4 ++--
 drivers/mtd/ubi/ubi.h   |   10 +++++-----
 drivers/mtd/ubi/vmt.c   |    4 +++-
 drivers/mtd/ubi/vtbl.c  |    1 +
 4 files changed, 11 insertions(+), 8 deletions(-)

Adrian Bunk (1):
      UBI: mtd/ubi/vtbl.c: fix memory leak

Artem Bityutskiy (1):
      UBI: fix error message

Harvey Harrison (1):
      UBI: fix sparse errors in ubi.h

S.Çağlar Onur (1):
      UBI: silence warning

commit f7f0283776b6fe33f87f6a2ef15b1feb49ef6dac
Author: Adrian Bunk <bunk@...nel.org>
Date:   Mon Mar 3 20:07:52 2008 +0200

    UBI: mtd/ubi/vtbl.c: fix memory leak
    
    This patch fixes a memory leak introduced by commit
    4ccf8cffa963c7b5bdc6d455ea9417084ee49aa8 and spotted by the Coverity
    checker.
    
    Signed-off-by: Adrian Bunk <bunk@...nel.org>
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@...ia.com>

diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c
index 56fc3fb..af36b12 100644
--- a/drivers/mtd/ubi/vtbl.c
+++ b/drivers/mtd/ubi/vtbl.c
@@ -519,6 +519,7 @@ static int init_volumes(struct ubi_device *ubi, const struct ubi_scan_info *si,
 			if (ubi->autoresize_vol_id != -1) {
 				ubi_err("more then one auto-resize volume (%d "
 					"and %d)", ubi->autoresize_vol_id, i);
+				kfree(vol);
 				return -EINVAL;
 			}
 

commit 8eee9f100b1cc3d1b0a701a8626c54422af3c987
Author: Harvey Harrison <harvey.harrison@...il.com>
Date:   Fri Feb 15 10:47:51 2008 +0200

    UBI: fix sparse errors in ubi.h
    
    In C, signed 1-bit bitfields can only take the values 0 and -1, only 0 and 1
    are ever assigned in current code.  Make them unsigned bitfields.
    
    Fixes the (repeated) sparse errors:
    drivers/mtd/ubi/ubi.h:220:15: error: dubious one-bit signed bitfield
    drivers/mtd/ubi/ubi.h:221:17: error: dubious one-bit signed bitfield
    drivers/mtd/ubi/ubi.h:222:18: error: dubious one-bit signed bitfield
    drivers/mtd/ubi/ubi.h:223:16: error: dubious one-bit signed bitfield
    drivers/mtd/ubi/ubi.h:224:20: error: dubious one-bit signed bitfield
    
    Signed-off-by: Harvey Harrison <harvey.harrison@...il.com>
    Cc: Artem Bityutskiy <dedekind@...radead.org>
    Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@...ia.com>

diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
index 4577106..a548c1d 100644
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
@@ -217,11 +217,11 @@ struct ubi_volume {
 	void *upd_buf;
 
 	int *eba_tbl;
-	int checked:1;
-	int corrupted:1;
-	int upd_marker:1;
-	int updating:1;
-	int changing_leb:1;
+	unsigned int checked:1;
+	unsigned int corrupted:1;
+	unsigned int upd_marker:1;
+	unsigned int updating:1;
+	unsigned int changing_leb:1;
 
 #ifdef CONFIG_MTD_UBI_GLUEBI
 	/*

commit 19cd7b7de1804a50264dfd5c6ba3c6d332362a77
Author: Artem Bityutskiy <Artem.Bityutskiy@...ia.com>
Date:   Tue Feb 12 16:32:35 2008 +0200

    UBI: fix error message
    
    Make it print "UBI error: cannot attach mtd4"
    instead of "UBI error: cannot attach 4"
    
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@...ia.com>

diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 6ac81e3..2759604 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -1000,8 +1000,8 @@ static int __init ubi_init(void)
 		mutex_unlock(&ubi_devices_mutex);
 		if (err < 0) {
 			put_mtd_device(mtd);
-			printk(KERN_ERR "UBI error: cannot attach %s\n",
-			       p->name);
+			printk(KERN_ERR "UBI error: cannot attach mtd%d\n",
+			       mtd->index);
 			goto out_detach;
 		}
 	}

commit fc398769ac5cbfdf4dc16a7ba657b284abcc92f5
Author: S.Çağlar Onur <caglar@...dus.org.tr>
Date:   Tue Feb 12 13:25:06 2008 +0200

    UBI: silence warning
    
    drivers/mtd/ubi/vmt.c: In function `ubi_create_volume':
    drivers/mtd/ubi/vmt.c:379: warning: statement with no effect
    
    Signed-off-by: S.Çağlar Onur <caglar@...dus.org.tr>
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@...ia.com>

diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c
index a3ca225..5be58d8 100644
--- a/drivers/mtd/ubi/vmt.c
+++ b/drivers/mtd/ubi/vmt.c
@@ -376,7 +376,9 @@ out_sysfs:
 	get_device(&vol->dev);
 	volume_sysfs_close(vol);
 out_gluebi:
-	ubi_destroy_gluebi(vol);
+	if (ubi_destroy_gluebi(vol))
+		dbg_err("cannot destroy gluebi for volume %d:%d",
+			ubi->ubi_num, vol_id);
 out_cdev:
 	cdev_del(&vol->cdev);
 out_mapping:

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

--
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