On 06-07-16, 17:04, Peter Rosin wrote: > Exactly, so the stored address had better be correct, and in
No. > that case there is no need for the new adapter_nr in every > client, you could just go with client->adapter->nr instead. client->adapter may be a dangling pointer at this point if the adapter is freed, so we can't use that blindly for sure. > Which just shows that the whole thing is fishy and that the > adapter has to remain alive. BTW, is there any guarantee that > adapter numbers will not get reused? We are allocating them from idr and that will reuse them once they get freed. -- viresh