We show the sum of the first k Lyapunov exponents of linear cocycles is an upper semicontinuous function in the L topologies, for any 1 ≤ p ≤ ∞ and k. This fact, together with a result from Arnold and Cong, implies that the Lyapunov exponents of the L-generic cocycle, p < ∞, are all equal.