The definition of a troll has changed. Initially it was;
a person who starts quarrels or upsets people on the Internet to distract and sow discord by posting inflammatory and digressive, extraneous, or off-topic messages in an online community (such as a newsgroup, forum, chat room, or blog) with the intent of provoking readers into displaying emotional responses and normalizing tangential discussion, whether for the troll's amusement or a specific gain.
The media, it seems, have extended the definition to include;
online harassment. For example, the mass media have used "troll" to mean "a person who defaces Internet tribute sites with the aim of causing grief to families".
https://en.wikipedia.org/wiki/Internet_trollWhich definition is used often depends on the readers opinion rather than on some neutral standard. People who behave in the manner described in the original definition are often the ones accusing others of 'trolling' by reference to the second definition imo.