projects
/
platform
/
kernel
/
linux-3.10.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d3e444
)
[CONNECTOR]: Don't touch queue dev after decrement of ref count.
author
Li Zefan
<lizf@cn.fujitsu.com>
Wed, 9 Jan 2008 07:44:44 +0000
(23:44 -0800)
committer
David S. Miller
<davem@davemloft.net>
Wed, 9 Jan 2008 07:44:44 +0000
(23:44 -0800)
cn_queue_free_callback() will touch 'dev'(i.e. cbq->pdev), so it
should be called before atomic_dec(&dev->refcnt).
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/connector/cn_queue.c
patch
|
blob
|
history
diff --git
a/drivers/connector/cn_queue.c
b/drivers/connector/cn_queue.c
index
296f510
..
12ceed5
100644
(file)
--- a/
drivers/connector/cn_queue.c
+++ b/
drivers/connector/cn_queue.c
@@
-99,8
+99,8
@@
int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id
spin_unlock_bh(&dev->queue_lock);
if (found) {
- atomic_dec(&dev->refcnt);
cn_queue_free_callback(cbq);
+ atomic_dec(&dev->refcnt);
return -EINVAL;
}