git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f6e1d8c
)
PCI: ibmphp_hpc: don't release hw sem twice if kthread stops
author
Jesse Barnes
<jbarnes@virtuousgeek.org>
Fri, 4 Dec 2009 23:18:01 +0000
(15:18 -0800)
committer
Jesse Barnes
<jbarnes@virtuousgeek.org>
Fri, 4 Dec 2009 23:18:01 +0000
(15:18 -0800)
If we stop the kthread, we may end up up'ing the sem twice, which seems
unintended.
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/hotplug/ibmphp_hpc.c
patch
|
blob
|
history
diff --git
a/drivers/pci/hotplug/ibmphp_hpc.c
b/drivers/pci/hotplug/ibmphp_hpc.c
index
83f337c
..
c7084f0
100644
(file)
--- a/
drivers/pci/hotplug/ibmphp_hpc.c
+++ b/
drivers/pci/hotplug/ibmphp_hpc.c
@@
-890,7
+890,7
@@
static int poll_hpc(void *data)
msleep(POLL_INTERVAL_SEC * 1000);
if (kthread_should_stop())
-
break
;
+
goto out_sleep
;
down (&semOperations);
@@
-904,6
+904,7
@@
static int poll_hpc(void *data)
/* give up the hardware semaphore */
up (&semOperations);
/* sleep for a short time just for good measure */
+out_sleep:
msleep(100);
}
up (&sem_exit);