From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Rakib Mullick <rakib.mullick@gmail.com>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: removes extra assignment from arch/x86/kernel/ldt.c
Date: Thu, 07 Aug 2008 12:32:32 -0700 [thread overview]
Message-ID: <489B4DD0.8080607@goop.org> (raw)
In-Reply-To: <b9df5fa10808060633j6c1db8e4haa5dc5fd549e7b08@mail.gmail.com>
Rakib Mullick wrote:
> Hello guys, this patch removes an extra assignment from "write_ldt" function.
> Thanks.
>
> Signed-off-by : Md.Rakib H. Mullick (rakib.mullick@gmail.com)
>
> --- linux-2.6.27-rc2.orig/arch/x86/kernel/ldt.c 2008-08-06
> 16:23:53.000000000 +0600
> +++ linux-2.6.27-rc2/arch/x86/kernel/ldt.c 2008-08-06 19:18:50.984268144 +0600
> @@ -191,11 +191,12 @@ static int write_ldt(void __user *ptr, u
> error = -EINVAL;
> if (bytecount != sizeof(ldt_info))
> goto out;
> - error = -EFAULT;
> - if (copy_from_user(&ldt_info, ptr, sizeof(ldt_info)))
> +
> + if (copy_from_user(&ldt_info, ptr, sizeof(ldt_info))) {
> + error = -EFAULT;
> goto out;
> + }
>
It would be better to move the EFAULT check up above so the EINVAL
checks are adjacent.
J
prev parent reply other threads:[~2008-08-07 19:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-06 13:33 [PATCH] x86: removes extra assignment from arch/x86/kernel/ldt.c Rakib Mullick
2008-08-07 19:32 ` Jeremy Fitzhardinge [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=489B4DD0.8080607@goop.org \
--to=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rakib.mullick@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox