While I've heard about child molesters/killers being set upon by fellow inmates, the Dahmer case is not an example of that.
Dahmer was killed along with another inmate who had killed his wife (Jesse Anderson). Dahmer and Anderson were the two most notorious killers in prison in WI and the guy who killed them---they were all three on a work detail team together that day---was after the notoriety of killing the two famous guys, thus gaining fame himself.
I can only remember that his first name was Chris but don't remember his last name. (So much for his attempt at fame)