[PATCH 2/3] pipe: avoid round_pipe_size() nr_pages overflow on 32-bit

2017-09-26 Thread Joe Lawrence
The round_pipe_size() function contains a right-bit-shift expression which may overflow, which would cause undefined results in a subsequent roundup_pow_of_two() call. static inline unsigned int round_pipe_size(unsigned int size) { unsigned long nr_pages; nr_pages = (size

[PATCH 2/3] pipe: avoid round_pipe_size() nr_pages overflow on 32-bit

2017-09-26 Thread Joe Lawrence
The round_pipe_size() function contains a right-bit-shift expression which may overflow, which would cause undefined results in a subsequent roundup_pow_of_two() call. static inline unsigned int round_pipe_size(unsigned int size) { unsigned long nr_pages; nr_pages = (size