Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cf585ae8ae9ac7287a6d078425ea32f22bf7f1f7 Commit: cf585ae8ae9ac7287a6d078425ea32f22bf7f1f7 Parent: 9d3e44425e3498eb33f25d94392b4fd0d56a5176 Author: Li Zefan <[EMAIL PROTECTED]> AuthorDate: Tue Jan 8 23:44:44 2008 -0800 Committer: David S. Miller <[EMAIL PROTECTED]> CommitDate: Tue Jan 8 23:44:44 2008 -0800
[CONNECTOR]: Don't touch queue dev after decrement of ref count. 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 <[EMAIL PROTECTED]> Signed-off-by: David S. Miller <[EMAIL PROTECTED]> --- drivers/connector/cn_queue.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/connector/cn_queue.c b/drivers/connector/cn_queue.c index 296f510..12ceed5 100644 --- 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; } - 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