+ kobject-must_check-fixes.patch added to -mm tree

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

 



The patch titled

     kobject: driver layer error checking

has been added to the -mm tree.  Its filename is

     kobject-must_check-fixes.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: kobject: driver layer error checking
From: Randy Dunlap <rdunlap@xxxxxxxxxxxx>

Check driver layer return values in lib/kobject.c

Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 lib/kobject.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff -puN lib/kobject.c~kobject-must_check-fixes lib/kobject.c
--- a/lib/kobject.c~kobject-must_check-fixes
+++ a/lib/kobject.c
@@ -457,6 +457,7 @@ static struct kobj_type dir_ktype = {
 struct kobject *kobject_add_dir(struct kobject *parent, const char *name)
 {
 	struct kobject *k;
+	int ret;
 
 	if (!parent)
 		return NULL;
@@ -468,7 +469,13 @@ struct kobject *kobject_add_dir(struct k
 	k->parent = parent;
 	k->ktype = &dir_ktype;
 	kobject_set_name(k, name);
-	kobject_register(k);
+	ret = kobject_register(k);
+	if (ret < 0) {
+		printk(KERN_WARNING "kobject_add_dir: "
+			"kobject_register error: %d\n", ret);
+		kobject_del(k);
+		return NULL;
+	}
 
 	return k;
 }
_

Patches currently in -mm which might be from rdunlap@xxxxxxxxxxxx are

acpi-bus-add-missing-newline.patch
fix-undefined-missing-references-in-isa-miro-sound-driver.patch
sysfs_remove_bin_file-no-return-value-dump_stack-on.patch
pcie-check-and-return-bus_register-errors.patch
pcie-check-and-return-bus_register-errors-fix.patch
pcie-cleanup-on-probe-error.patch
aic7-cleanup-module_parm_desc-strings.patch
dc395x-fix-printk-format-warning.patch
areca-raid-linux-scsi-driver.patch
consistently-use-max_errno-in-__syscall_return.patch
consistently-use-max_errno-in-__syscall_return-fix.patch
eisa-bus-modalias-attributes-support-1.patch
bttv-must_check-fixes.patch
ide-core-must_check-fixes.patch
input-must_check-fixes.patch
kernel-params-must_check-fixes.patch
kobject-must_check-fixes.patch
pcmcia-ds-must_check-fixes.patch
scsi_debug-must_check-fixes.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