The patch titled
     pktcdvd: add kobject_put when kobject register fails
has been added to the -mm tree.  Its filename is
     pktcdvd-add-kobject_put-when-kobject-register-fails.patch

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

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

------------------------------------------------------
Subject: pktcdvd: add kobject_put when kobject register fails
From: Dave Young <[EMAIL PROTECTED]>

In kobject_register, the kobject reference is get in kobject_init, and then
kobject_add.  If kobject_add fail, it will only cleanup the reference got
by itself.

Signed-off-by: Dave Young <[EMAIL PROTECTED]>
Reviewed-by: Pekka Enberg <[EMAIL PROTECTED]>
Cc: Greg KH <[EMAIL PROTECTED]>
Cc: Peter Osterlund <[EMAIL PROTECTED]>
Cc: Jens Axboe <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 drivers/block/pktcdvd.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff -puN 
drivers/block/pktcdvd.c~pktcdvd-add-kobject_put-when-kobject-register-fails 
drivers/block/pktcdvd.c
--- 
a/drivers/block/pktcdvd.c~pktcdvd-add-kobject_put-when-kobject-register-fails
+++ a/drivers/block/pktcdvd.c
@@ -117,8 +117,10 @@ static struct pktcdvd_kobj* pkt_kobj_cre
        p->kobj.parent = parent;
        p->kobj.ktype = ktype;
        p->pd = pd;
-       if (kobject_register(&p->kobj) != 0)
+       if (kobject_register(&p->kobj) != 0) {
+               kobject_put(&p->kobj);
                return NULL;
+       }
        return p;
 }
 /*
_

Patches currently in -mm which might be from [EMAIL PROTECTED] are

git-cpufreq.patch
bluetooth-hidp_process_hid_control-remove-unnecessary-parameter-dealing.patch
bluetooth-rfcomm-tty_close-before-destruct.patch
pktcdvd-add-kobject_put-when-kobject-register-fails.patch

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

Reply via email to