Finally, a teacher must be careful not to cause his student undue harm. Halachah permits a teacher to strike a child for educational purposes, and embarrassment may also be justified, if it is for the student’s benefit. (The Talmud states that striking one’s older child is prohibited as it may incite him to hit back.) However, in today’s era of brazenness, corporal punishment even in early childhood often teaches violence rather than discipline, and must be carefully evaluated. Verbal abuse by a teacher can have a decidedly negative effect on his students and may undermine all efforts at educating the students regarding shmiras halashon.
In any situation where embarrassment or physical punishment might result from the teacher relating the student’s problem to others, he may do so only if the consequences are necessary for the student’s growth and development. As mentioned above, teachers must also bear in mind the long-term effects of relating or recording negative information about a student.
Sefer Chofetz Chaim, 2 Kislev, page 172
es