A plane heading to Shanghai returned safely to Sydney after an in-flight problem left a gaping hole in the engine casing.