[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b66e21d0f55b4f568c81bb9d5d22b7a7@AcuMS.aculab.com>
Date: Thu, 23 Aug 2018 11:23:35 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Michal Hocko' <mhocko@...nel.org>, Weikang Shi <swkhack@...il.com>
CC: "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"alexander.h.duyck@...el.com" <alexander.h.duyck@...el.com>,
"vbabka@...e.cz" <vbabka@...e.cz>,
"mgorman@...e.de" <mgorman@...e.de>,
"l.stach@...gutronix.de" <l.stach@...gutronix.de>,
"vdavydov.dev@...il.com" <vdavydov.dev@...il.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"my_email@...il.com" <my_email@...il.com>
Subject: RE: [PATCH] fs: fix local var type
From: Michal Hocko
> Sent: 23 August 2018 12:14
>
> On Thu 23-08-18 01:59:14, Weikang Shi wrote:
> > In the seq_hex_dump function,the remaining variable is int, but it receive a type of size_t
> argument.
> > So I change the type of remaining
>
> The changelog should explain _why_ we need this fix. Is any of the code
> path overflowing?
>
> Besides that I do not think this fix is complete. What about linelen?
>
> Why do we even need len to be size_t? Why it cannot be int as well. I
> strongly doubt we need more than 32b here.
Although you may well want 'unsigned int' to avoid the sign extension
instruction that gets added for x86_64 when a signed int is added
to a pointer.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists