Re: [PATCH] RDMA/mlx4: Remove unnessesary check in mlx4_ib_modify_wq()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux