I, personally, think a deus ex machina only works if it's been somewhat foreshadowed.
If it has been foreshadowed then is it a deus ex machina? The modern literature definition is that: a conflict arises in the narrative and is then resolved by suddenly introducing a god-like character, or unexpected force, or event. If you've foreshadowed it then it's no longer unexpected but becomes something else, no?
To give an answer to your question
@Drakai , unless an author is making some sort of major point about the hopelessness of humanity's position or something thematically grand like that, then they just frustrate and make it more likely I will not read any more of that author's work. Particularly if a deus ex machina is injected to solve simple and small plot points. (Everyone bangs on about the Eagles in LotR, but what about the two bands of orcs practically wiping each other out at the tower of Cirith Ungol, giving Sam a more or less free run to rescue Frodo?)
I was trying to think of good and bad examples. (IMHO I will add!)
Good - the end of the novel
Lord of the Flies when the Naval officer finds the boys on the shore - a neat ending that adds another layer to the themes explored in the book.
Absolutely gawd-damn awful - Christopher Reeve making the Earth spin round the opposite way to go back in time and save Lois Lane and everyone else in
Superman I. Even as a 6 year old in the cinema I had problems with this ending - I mean if he can do that, then that solves all problems from then on, right?* And also - if he'd been able to go so fast to make time change - he was zipping around the earth pretty fast - then he seemed to be fast enough to catch both nuclear missiles, no? So why didn't he get his speed up then?
I think that film might have sown the seeds that have grown into my moderate dislike of the whole superhero genre...
---------------------------------------------------
*Ogma - I don't remember any foreshadowing whatsoever- but, hey, I could be wrong. All I can see on the interweb is his dad telling him 'not to interfere with human history' which doesn't equate in my book to 'don't go back in time', I see that as 'don't use your power to make humanity do what you want'.