My Arab gelding used to be vicious about feeding , his stall had a shorter wall so you could put feed into it easily (note no other horses could get near him) an if you walked to close to it he would lunge at you an rear up an strike out , an this ONLY happened outside of the stall. In the stall he would just pin his ears an hold an aggressive posture.
Hes SOO much better now that hes fed in the wide open. He still can be a little grumpy but mostly just ear pinning.

"Blessed are the flexible for they shall not get bent out of shape"
"You can discipline and Discourage or you can Discipline and Encourage"
"Gentle in what you do , But firm in how you do it"