From: Marcin Slusarz <marcin.slusarz@gmail.com>
To: Roel Kluin <12o3l@tiscali.nl>
Cc: ralf@linux-mips.org, linux-mips@linux-mips.org,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/6] MIPS: irixelf: fix test unsigned var < 0
Date: Wed, 16 Apr 2008 21:39:44 +0200 [thread overview]
Message-ID: <20080416193941.GB6264@joi> (raw)
In-Reply-To: <480558CA.7090800@tiscali.nl>
On Wed, Apr 16, 2008 at 03:39:22AM +0200, Roel Kluin wrote:
> v is unsigned, cast to signed to evaluate the do_brk() return value,
>
> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
> ---
> diff --git a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c
> index 290d8e3..fad2a2a 100644
> --- a/arch/mips/kernel/irixelf.c
> +++ b/arch/mips/kernel/irixelf.c
> @@ -583,15 +583,15 @@ static void irix_map_prda_page(void)
> unsigned long v;
> struct prda *pp;
>
> down_write(¤t->mm->mmap_sem);
> v = do_brk(PRDA_ADDRESS, PAGE_SIZE);
> up_write(¤t->mm->mmap_sem);
>
> - if (v < 0)
> + if ((long) v < 0)
maybe cast it earlier (to struct prda *) and check error with IS_ERR?
> return;
>
> pp = (struct prda *) v;
> pp->prda_sys.t_pid = task_pid_vnr(current);
> pp->prda_sys.t_prid = read_c0_prid();
> pp->prda_sys.t_rpid = task_pid_vnr(current);
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
prev parent reply other threads:[~2008-04-16 19:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-16 1:39 [PATCH 1/6] MIPS: irixelf: fix test unsigned var < 0 Roel Kluin
2008-04-16 15:27 ` Roel Kluin
2008-04-16 15:32 ` [PATCH 4/6] RTC: rtc-ds1374: fix unsigned new_alarm test Roel Kluin
2008-04-18 21:58 ` Alessandro Zummo
2008-04-16 16:00 ` [PATCH 5/6] NETFILTER: signed tcphoff for ipv6_skip_exthdr() retval Roel Kluin
2008-04-21 12:24 ` [netfilter-core] " Patrick McHardy
2008-04-16 16:20 ` [PATCH 6/6] sound/drivers/dummy.c: fix negative snd_pcm_format_width() check Roel Kluin
2008-04-16 16:31 ` Takashi Iwai
2008-04-16 16:31 ` [alsa-devel] " Takashi Iwai
2008-04-16 18:00 ` [PATCH 1/6] MIPS: irixelf: fix test unsigned var < 0 Ralf Baechle
2008-04-16 19:39 ` Marcin Slusarz [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=20080416193941.GB6264@joi \
--to=marcin.slusarz@gmail.com \
--cc=12o3l@tiscali.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.