Merge tag 'fixes-for-v4.1-rc2' of https://github.com/rjarzmik/linux into fixes
[linux-2.6-block.git] / kernel / smp.c
index 2aaac2c47683d38efa407c139cbe1b6f4e18e678..07854477c16447ff87df874b4f117bcafadd4f33 100644 (file)
@@ -159,8 +159,10 @@ static int generic_exec_single(int cpu, struct call_single_data *csd,
        }
 
 
-       if ((unsigned)cpu >= nr_cpu_ids || !cpu_online(cpu))
+       if ((unsigned)cpu >= nr_cpu_ids || !cpu_online(cpu)) {
+               csd_unlock(csd);
                return -ENXIO;
+       }
 
        csd->func = func;
        csd->info = info;