[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210511174302.GA1291834@nvidia.com>
Date: Tue, 11 May 2021 14:43:02 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Cc: yishaih@...dia.com, dledford@...hat.com,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] RDMA/mlx4: Remove unnessesary check in
mlx4_ib_modify_wq()
On Fri, May 07, 2021 at 06:22:41PM +0800, Jiapeng Chong wrote:
> cur_state and new_state are enums and when GCC considers
> them as unsigned, the conditions are never met.
But doesn't gcc consider enums to be 'int' as the standard requires?
This change looks really sketchy to me, cur_state and new_state are
both userspace controlled data. We should not make assumptions about
the underlying signedness of an enum when validating user data.
Jason
Powered by blists - more mailing lists