Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=015b066f4e5dbd301144c2de1c53329178f67a01
Commit:     015b066f4e5dbd301144c2de1c53329178f67a01
Parent:     11f494ee25dd81af90255b1d61abc6f5508db4d0
Author:     Kristian Høgsberg <[EMAIL PROTECTED]>
AuthorDate: Mon Mar 19 11:37:16 2007 -0400
Committer:  Stefan Richter <[EMAIL PROTECTED]>
CommitDate: Tue Mar 20 23:27:19 2007 +0100

    firewire: Grab dev->sem when doing the update callback.
    
    This serializes the update callback with the probe and remove callback from
    the driver core and prevents remove from being called while update is
    running for the same device.
    
    Signed-off-by: Kristian Høgsberg <[EMAIL PROTECTED]>
    Signed-off-by: Stefan Richter <[EMAIL PROTECTED]>
---
 drivers/firewire/fw-device.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/firewire/fw-device.c b/drivers/firewire/fw-device.c
index 4877cdb..15721a7 100644
--- a/drivers/firewire/fw-device.c
+++ b/drivers/firewire/fw-device.c
@@ -562,8 +562,11 @@ static int update_unit(struct device *dev, void *data)
        struct fw_unit *unit = fw_unit(dev);
        struct fw_driver *driver = (struct fw_driver *)dev->driver;
 
-       if (is_fw_unit(dev) && driver != NULL && driver->update != NULL)
+       if (is_fw_unit(dev) && driver != NULL && driver->update != NULL) {
+               down(&dev->sem);
                driver->update(unit);
+               up(&dev->sem);
+       }
 
        return 0;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to