mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [Q] possible proc inode numbers overflow?
  2004-09-24 14:10 [Q] possible proc inode numbers overflow? Kirill Korotaev
@ 2004-09-24 14:04 ` William Lee Irwin III
  0 siblings, 0 replies; 2+ messages in thread
From: William Lee Irwin III @ 2004-09-24 14:04 UTC (permalink / raw)
  To: Kirill Korotaev; +Cc: Albert Cahalan, linux-kernel

On Fri, Sep 24, 2004 at 06:10:39PM +0400, Kirill Korotaev wrote:
> fs/proc/generic.c:
> #define PROC_DYNAMIC_FIRST 0xF0000000UL
> static unsigned int get_inode_number(void)
> {
> 	...
>         inum = (i & MAX_ID_MASK) + PROC_DYNAMIC_FIRST;
> 
>         /* inum will never be more than 0xf0ffffff, so no check
>          * for overflow.
>          */
> 	...
> }
> is it really correct? Looks like MAX_ID_MASK = 0x7FFFFFFF and 
> PROC_DYNAMIC_FIRST is 0xF0000000.
> So at least the comment is wrong?

The comment is wrong. Albert Cahalan and I are working on a new fix.


-- wli

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Q] possible proc inode numbers overflow?
@ 2004-09-24 14:10 Kirill Korotaev
  2004-09-24 14:04 ` William Lee Irwin III
  0 siblings, 1 reply; 2+ messages in thread
From: Kirill Korotaev @ 2004-09-24 14:10 UTC (permalink / raw)
  To: linux-kernel

fs/proc/generic.c:

#define PROC_DYNAMIC_FIRST 0xF0000000UL
static unsigned int get_inode_number(void)
{
	...
         inum = (i & MAX_ID_MASK) + PROC_DYNAMIC_FIRST;

         /* inum will never be more than 0xf0ffffff, so no check
          * for overflow.
          */
	...
}

is it really correct? Looks like MAX_ID_MASK = 0x7FFFFFFF and 
PROC_DYNAMIC_FIRST is 0xF0000000.

So at least the comment is wrong?

Kirill


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-09-24 14:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-24 14:10 [Q] possible proc inode numbers overflow? Kirill Korotaev
2004-09-24 14:04 ` William Lee Irwin III

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®