> > I asked linux-usb and they said the two interfaces are probed > and disconnected one at a time, so it should be fine without > another mutex: > > https://lore.kernel.org/linux-usb/2024032907-smokeless-imperial-f3f9@gregkh/ Thanks for the clarification. Then, will you dynamically allocate mutex by first interface with ref_cnt=1, and second interface obtains mutex from first interface and increases ref_cnt=2? When USB disconnection, decrease ref_cnt and if ref_cnt==0 free the mutex no matter which one disconnect first. My thinking above is the same as yours?