Skip to content

Commit

Permalink
[PATCH] proc: inode number fixlet
Browse files Browse the repository at this point in the history
Ouch, if number taken from IDA is too big, the intent was to signal an
error, not check for overflow and still do overflowing addition.

One still needs 2^28 proc entries to notice this.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Alexey Dobriyan authored and Al Viro committed Aug 25, 2008
1 parent 6450f65 commit cc99609
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/proc/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ static unsigned int get_inode_number(void)
spin_lock(&proc_inum_lock);
ida_remove(&proc_inum_ida, i);
spin_unlock(&proc_inum_lock);
return 0;
}
return PROC_DYNAMIC_FIRST + i;
}
Expand Down

0 comments on commit cc99609

Please sign in to comment.