[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALLzPKb1Vw+03rJEfrcYjf2zkRHkchup1=ht05bzna99L6NxQQ@mail.gmail.com>
Date: Wed, 18 Jan 2012 12:38:22 +0200
From: "Kasatkin, Dmitry" <dmitry.kasatkin@...el.com>
To: David Howells <dhowells@...hat.com>
Cc: jmorris@...ei.org, keyrings@...ux-nfs.org,
linux-security-module@...r.kernel.org,
linux-kernel@...r.kernel.org, stable@...nel.org,
Mimi Zohar <zohar@...ibm.com>
Subject: Re: [PATCH] MPILIB: Add a missing ENOMEM check
On Wed, Jan 18, 2012 at 12:03 PM, David Howells <dhowells@...hat.com> wrote:
> Add a missing ENOMEM check.
>
> Signed-off-by: David Howells <dhowells@...hat.com>
> Acked-by: Mimi Zohar <zohar@...ibm.com>
Thanks.
> ---
>
> lib/mpi/mpicoder.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/lib/mpi/mpicoder.c b/lib/mpi/mpicoder.c
> index fe84bb9..716802b 100644
> --- a/lib/mpi/mpicoder.c
> +++ b/lib/mpi/mpicoder.c
> @@ -255,6 +255,8 @@ void *mpi_get_buffer(MPI a, unsigned *nbytes, int *sign)
> if (!n)
> n++; /* avoid zero length allocation */
> p = buffer = kmalloc(n, GFP_KERNEL);
> + if (!p)
> + return NULL;
>
> for (i = a->nlimbs - 1; i >= 0; i--) {
> alimb = a->d[i];
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
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