> Maybe we should initial the atomic_t variable before we using such as
> atomic_inc/dec() directly.
> 
> Dongdong.
> 
> 
> --- a/kernel/kgdb.c
> +++ b/kernel/kgdb.c
> @@ -227,6 +227,17 @@ kgdb_post_primary_code(struct pt_regs *regs, int
> e_vector, int err_code)
>          return;
>   }
> 
> +static void kgdb_initial_atomic_var()
> +{
> +       int i;
> +       for (i = NR_CPUS-1; i >= 0; i--) {
> +               atomic_set(&passive_cpu_wait[i], 0);
> +               atomic_set(&cpu_in_kgdb[i], 0);
> +       }
> +
> +       atomic_set(&kgdb_setting_breakpoint, 0);
> +}
> +

Given that passive_cpu_wait and cpu_in_kgdb are static, I think those guys
are alright as-is. kgdb_setting_breakpoint should probably be reset though.

Will



------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Kgdb-bugreport mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to