I've seen 3 SurfaceFlinger crashes myself during the last days. It seems there's a bug in the implementation. As I'm using an S5 I cannot say wheter it's a Samsung specific or a general Android 4.4.2 issue. Which device are you working with?
To recover from this issue, you can simply do a reboot of the device. Sometimes I managed to execute a "kill -9 " (I got the pid using "ps | grep ") and bring everything back to live without rebooting the device. I used to kill the remaining/hanging surfaceflinger or mediaserver service. As it does an auto-restart after being killed, everything is fine again afterwards.
As these are binaries delivered with the device, it might be impossible to fix this issue. But there's a small chance: If the binaries are the same as those in AOSP (Android Opensource Project http://source.android.com/) you could try to compile those and replace the ones on your phone (please do a backup of the original ones first).
If the binaries are device specific, you might find them on the opensource pages of your device vendor. Like http://opensource.samsung.com/ for Samsung devices. These sources are usually easy to compile and can replace binaries on your phone.
Apart from that, I think there's not much more left than reporting the issue.