+ i2o-destroy-event-queue-only-when-drv-event-is-set.patch added to -mm tree

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

 



The patch titled
     i2o: destroy event queue only when drv->event is set
has been added to the -mm tree.  Its filename is
     i2o-destroy-event-queue-only-when-drv-event-is-set.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: i2o: destroy event queue only when drv->event is set
From: Akinobu Mita <akinobu.mita@xxxxxxxxx>

i2o_driver_register() initalizes event queue for driver only when
drv->event is set.  So similarly the event queue should be destroyed only
when drv->event is set in the error path.  Otherwise destroy_workqueue()
will called with NULL.

Cc: Markus Lidel <Markus.Lidel@xxxxxxxxxxxxxxxxx>
Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/message/i2o/driver.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff -puN drivers/message/i2o/driver.c~i2o-destroy-event-queue-only-when-drv-event-is-set drivers/message/i2o/driver.c
--- a/drivers/message/i2o/driver.c~i2o-destroy-event-queue-only-when-drv-event-is-set
+++ a/drivers/message/i2o/driver.c
@@ -123,8 +123,12 @@ int i2o_driver_register(struct i2o_drive
 	}
 
 	rc = driver_register(&drv->driver);
-	if (rc)
-		destroy_workqueue(drv->event_queue);
+	if (rc) {
+		if (drv->event) {
+			destroy_workqueue(drv->event_queue);
+			drv->event_queue = NULL;
+		}
+	}
 
 	return rc;
 };
_

Patches currently in -mm which might be from akinobu.mita@xxxxxxxxx are

auth_gss-unregister-gss_domain-when-unloading-module.patch
i2o-destroy-event-queue-only-when-drv-event-is-set.patch
add-kstrndup.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