Spoilers ahead......
In season 5, episode 12, "Dead is Dead," Ben Linus is trying to go to see the monster/black smoke so that he can be judged for what he's done on the island. John Locke is talking to Ben and John says that if Ben has done everything in the best interests of the island, then he will understand.
Maybe when Mr. Eko Tunde killed those men and then soon after came into contact with the smoke, the smoke judged him and realized that it was in best interest for the island, therefore deciding not to harm him. hope you understand what im trying to say.