At the outset of this topic area, it's important to mention this: from the 4.11 kernel, there is a newer and better set of interfaces christened the refcount_t APIs, meant for a kernel space object's reference counters. It greatly improves the security posture of the kernel (via much-improved Integer OverFlow (IoF) and Use After Free (UAF) protection as well as memory ordering guarantees, which the older atomic_t APIs lack). The refcount_t interfaces, like several other security technologies used on Linux, have their origins in work done by The PaX Team – https://pax.grsecurity.net/ (it was called PAX_REFCOUNT).
Having said that, the reality is that (as of the time of writing) the older atomic_t interfaces are still very much in use within the kernel core and drivers (they are slowly being converted, with the older atomic_t interfaces being moved to the newer refcount_t model and...