Most of the time, the reaction of alcohols with thionyl chloride is taught as an SN2 reaction. And indeed, on primary alcohols this is definitely the case. The problem arises with secondary alcohols, where the reaction can be taught either as a classical SN2 with inversion, or… as a reaction with retention.