More nitpicks ;)

On Fri, Mar 28, 2014 at 08:53:18AM +0000, Li Zefan wrote:
> diff --git a/Documentation/kmemleak.txt b/Documentation/kmemleak.txt
> index 6dc8013..a7e6a06 100644
> --- a/Documentation/kmemleak.txt
> +++ b/Documentation/kmemleak.txt
> @@ -51,7 +51,8 @@ Memory scanning parameters can be modified at run-time by 
> writing to the
>                 (default 600, 0 to stop the automatic scanning)
>    scan               - trigger a memory scan
>    clear              - clear list of current memory leak suspects, done by
> -               marking all current reported unreferenced objects grey
> +               marking all current reported unreferenced objects grey.
> +               Or free all kmemleak objects if kmemleak has been disabled.

Comma after "unreferenced objects grey" and lower-case "or free ..."

> diff --git a/mm/kmemleak.c b/mm/kmemleak.c
> index be7ecc0..6631df8 100644
[...]
> @@ -1690,17 +1711,16 @@ static const struct file_operations kmemleak_fops = {
>   */
>  static void kmemleak_do_cleanup(struct work_struct *work)
>  {
> -     struct kmemleak_object *object;
> -
>       mutex_lock(&scan_mutex);
>       stop_scan_thread();
>  
> -     if (!kmemleak_has_leaks) {
> -             rcu_read_lock();
> -             list_for_each_entry_rcu(object, &object_list, object_list)
> -                     delete_object_full(object->pointer);
> -             rcu_read_unlock();
> -     }
> +     if (!kmemleak_has_leaks)
> +             __kmemleak_do_cleanup();
> +     else
> +             pr_info("Disable kmemleak without freeing internal objects, "
> +                     "so you may still check information on memory leaks. "
> +                     "You may reclaim memory by writing \"clear\" to "
> +                     "/sys/kernel/debug/kmemleak\n");

Alternative text:

                pr_info("Kmemleak disabled without freeing internal data. "
                        "Reclaim the memory with \"echo clear > 
/sys/kernel/debug/kmemleak\"\n");

(I'm wouldn't bother with long lines in printk strings)

Otherwise:

Acked-by: Catalin Marinas <[email protected]>

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to