diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2010-07-13 10:31:55 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2010-07-13 10:31:55 +0000 |
commit | 3d5c42a871d30c4fb6ee6520b0c4c39ffa86fe18 (patch) | |
tree | 412437bd554480cfeb9e265bd7c7dea576f56268 /drivers/dahdi/xpp/card_global.c | |
parent | d6035ac6ad1c10d867c57cd53e074fa521a537b0 (diff) |
Solve race xbus_populate
Fixes a crash resulting from a race between disconnecting and connecting
Astribanks (on multi-core systems)
* Use get_xbus()/put_xbus() arround xbus_populate(), so a disconnect
in the middle won't release the xbus too early.
* Aquire all XPDs before starting initialization and release them
after it finishes (so we don't have up/down races among XPDs)
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8886 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/xpp/card_global.c')
-rw-r--r-- | drivers/dahdi/xpp/card_global.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/dahdi/xpp/card_global.c b/drivers/dahdi/xpp/card_global.c index 2428cbe..4cf5ca5 100644 --- a/drivers/dahdi/xpp/card_global.c +++ b/drivers/dahdi/xpp/card_global.c @@ -799,7 +799,8 @@ int run_initialize_registers(xpd_t *xpd) xbus = xpd->xbus; if(!initdir || !initdir[0]) { XPD_NOTICE(xpd, "Missing initdir parameter\n"); - return -EINVAL; + ret = -EINVAL; + goto err; } if(!xpd_setstate(xpd, XPD_STATE_INIT_REGS)) { ret = -EINVAL; |