Re: [PATCH 2/2] vsprintf: don't dereference pointers to the first or last page

2018-03-07 Thread Andy Shevchenko
On Tue, 2018-03-06 at 19:11 +0100, Adam Borowski wrote: > As old code to avoid so is inconsistent, let's unify it within a > single > macro. > > > +#define IS_BAD_PTR(x) ((unsigned long)(x) >= (unsigned long)- > PAGE_SIZE \ > + || (unsigned long)(x) < PAGE_SIZE) Oh,

[PATCH 2/2] vsprintf: don't dereference pointers to the first or last page

2018-03-06 Thread Adam Borowski
As old code to avoid so is inconsistent, let's unify it within a single macro. Signed-off-by: Adam Borowski --- lib/vsprintf.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 1c2c3cc5a321..4914dac03f0a 100644 --- a/lib/vsprint