Linus Torvalds writes: (Summary) But then it should literally check *that*: it could do
something like
something like
WARN_ON_ONCE(current == resume_thread, "Firmware loading called synchronously during resume");
called synchronously during resume");
or whatever, exactly because it's obviously *not* ok to block the same process that is going to resume all the other devices that might be *needed* for the firmware loading.
*needed* for the firmware loading.
But on the other hand, if somebody then does an independent thread to resume their firmware, we could just block to wait for it - it wouldn't be the same kind of chicken-and-egg issue with IO at resume time.
time.
So instead of "arbitrary rules", there should be things that actually make sense.
make sense.
The commit that Luis now argues for _also_ reverting makes a lot of sense to me to keep.
something like
WARN_ON_ONCE(current == resume_thread, "Firmware loading called synchronously during resume");
called synchronously during resume");
or whatever, exactly because it's obviously *not* ok to block the same process that is going to resume all the other devices that might be *needed* for the firmware loading.
*needed* for the firmware loading.
But on the other hand, if somebody then does an independent thread to resume their firmware, we could just block to wait for it - it wouldn't be the same kind of chicken-and-egg issue with IO at resume time.
time.
So instead of "arbitrary rules", there should be things that actually make sense.
make sense.
The commit that Luis now argues for _also_ reverting makes a lot of sense to me to keep.