You can attack your slave without it going permanently hostile. Just need to order it to do something else after it goes hostile and it's suddenly tame again.