Re: [PATCH] netns: make struct pernet_operations::id unsigned int
From: Alexey DobriyanDate: Thu, 17 Nov 2016 04:58:21 +0300 > Make struct pernet_operations::id unsigned. ... > Signed-off-by: Alexey Dobriyan Applied, thank you.
[PATCH] netns: make struct pernet_operations::id unsigned int
Make struct pernet_operations::id unsigned. There are 2 reasons to do so: 1) This field is really an index into an zero based array and thus is unsigned entity. Using negative value is out-of-bound access by definition. 2) On x86_64 unsigned 32-bit data which are mixed with pointers via array