Solving linear stochastic differential equations