Sheng Yang wrote:
if (cancel_work_sync(&assigned_dev->interrupt_work))
        kvm_put_kvm(kvm);

In fact, cancel_work_sync() would return true either work struct is only
scheduled or the callback of work struct is executed. This code only
consider the former situation.
Why not simply drop the reference inc / dec from irq handler/work
function?

Sorry, I don't know the answer. After checking the code, I also think it's a
little strange to increase refernce count here, and I think we won't suppose
work_handler can release the kvm struct.

Maybe Avi knows? Or Amit and Weidong?

Not sure what the reasoning was, but it does seem like reference counting can be safely dropped from interrupt_work.

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to