lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <84144f020910090516gac3d598rad20ea3ced063acf@mail.gmail.com>
Date:	Fri, 9 Oct 2009 15:16:27 +0300
From:	Pekka Enberg <penberg@...helsinki.fi>
To:	Catalin Marinas <catalin.marinas@....com>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] kmemleak: Check for NULL pointer returned by 
	create_object()

On Fri, Oct 9, 2009 at 12:30 PM, Catalin Marinas
<catalin.marinas@....com> wrote:
> This patch adds NULL pointer checking in the early_alloc() function.
>
> Reported-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> Signed-off-by: Catalin Marinas <catalin.marinas@....com>

Acked-by: Pekka Enberg <penberg@...helsinki.fi>

> ---
>  mm/kmemleak.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/mm/kmemleak.c b/mm/kmemleak.c
> index a617518..8bf765c 100644
> --- a/mm/kmemleak.c
> +++ b/mm/kmemleak.c
> @@ -834,11 +834,14 @@ static void early_alloc(struct early_log *log)
>        rcu_read_lock();
>        object = create_object((unsigned long)log->ptr, log->size,
>                               log->min_count, GFP_ATOMIC);
> +       if (!object)
> +               goto out;
>        spin_lock_irqsave(&object->lock, flags);
>        for (i = 0; i < log->trace_len; i++)
>                object->trace[i] = log->trace[i];
>        object->trace_len = log->trace_len;
>        spin_unlock_irqrestore(&object->lock, flags);
> +out:
>        rcu_read_unlock();
>  }
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ