]> git.openfabrics.org - ~shefty/rdma-win.git/commit
[IBAL] crash on IBBUS disabling while mad traffic. [mlnx: 4275]
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 3 May 2009 12:47:37 +0000 (12:47 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 3 May 2009 12:47:37 +0000 (12:47 +0000)
commit1acdd5a725172bda360f9b2231baf5c93e596da9
tree35a99ec5945c9617e9dc2c4c0fa9283316482e7a
parent7c57e329bd38f61289ea97d0d7cf024e1ac13cbf
[IBAL] crash on IBBUS disabling while mad traffic. [mlnx: 4275]

__ioc_query_sa takes references on IOC PnP service before sending the node and path_record requests.
But these references get released at the end of __node_rec_cb and __path_rec_cb, while __process_sweep routine, which performs the IOU sweeping, is just scheduled to run in an async thread.
If the test happens to unload the driver after __node_rec_cb and __path_rec_cb and before __process_sweep started to run, IOC PnP service gets released and __process_sweep crashes.

The patch takes a reference on IOC PnP service before scheduling a thread for __process_sweep and releases the reference at the end of __process_sweep.
(Pay attention, that __process_sweep schedules a thread for itself twice while moving through its FSM:
SWEEP_IOU_INFO --> SWEEP_IOC_PROFILE --> SWEEP_SVC_ENTRIES --> SWEEP_COMPLETE)

git-svn-id: svn://openib.tc.cornell.edu/gen1@2144 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
trunk/core/al/kernel/al_ioc_pnp.c