> Yes. It is not safe, so I 'must wait_event_timeout before free cookie'....
> But is there a safe way to do it?
> Maybe:
> ->allocate cookie
> -> map it to an unique id
> ->set the id to req->cookie
> ->receive response and check id valid? Then access cookie?
This is part of why adding cookies in a separate patch with a good
commit message is important.
Please take a step back. What is the big picture? Why do you need a
cookie? What is it used for? If you describe what your requirements
are, we might be able to suggest a better solution, or point you at a
driver you can copy code from.
Andrew