mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Valdis.Kletnieks@vt.edu
To: Timur Tabi <timur.tabi@ammasso.com>
Cc: Jesper Juhl <juhl-lkml@dif.dk>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Remove pointless <0 comparison for unsigned variable in fs/fcntl.c
Date: Thu, 25 Nov 2004 17:34:42 -0500	[thread overview]
Message-ID: <200411252234.iAPMYgoC016311@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Tue, 23 Nov 2004 17:03:10 CST." <41A3C1AE.5060604@ammasso.com>

[-- Attachment #1: Type: text/plain, Size: 745 bytes --]

On Tue, 23 Nov 2004 17:03:10 CST, Timur Tabi said:
> Jesper Juhl wrote:
> 
> > if pid_t is 16 bit, then the value can never be greater than 0xffff but, 
> > if pid_t is greater than 16 bit, say 32 bit, then the argument "a" could 
> > very well contain a value greater than 0xffff and then the comparison 
> > makes perfect sense.
> 
> If pid_t is 32-bit, then what's wrong with the value being greater than 
> 0xFFFF?  After all, if pid_t a 32-bit number, that implies that 32-bit 
> values are acceptable.

Try setting max_pid to 256K or so on an i386 - although the result fits
nicely in a pid_t with plenty of bits to spare, Very Bad Things happen.

Long thread starting at http://marc.theaimsgroup.com/?l=linux-kernel&m=109497978724424&w=2

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

      parent reply	other threads:[~2004-11-27  6:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-21 22:55 Jesper Juhl
2004-11-22  1:02 ` Matthew Wilcox
2004-11-23  9:42   ` Jesper Juhl
2004-11-23 10:42     ` Jamie Lokier
2004-11-23 18:28       ` Bryan Henderson
2004-11-23 18:03     ` Linus Torvalds
2004-11-23 18:39       ` Jesper Juhl
2004-11-23 18:37         ` Linus Torvalds
2004-11-23 19:20           ` linux-os
2004-11-23 23:16           ` Jesper Juhl
2004-11-23 19:13       ` Timur Tabi
2004-11-23 23:09         ` Jesper Juhl
2004-11-23 23:03           ` Timur Tabi
2004-11-23 23:19             ` Jesper Juhl
2004-11-23 23:09               ` Timur Tabi
2004-11-23 23:28                 ` Jesper Juhl
2004-11-25 22:34             ` Valdis.Kletnieks [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=200411252234.iAPMYgoC016311@turing-police.cc.vt.edu \
    --to=valdis.kletnieks@vt.edu \
    --cc=juhl-lkml@dif.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=timur.tabi@ammasso.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

all inboxes | Powered by JetHome®