fs/pipe.c: local vars have to match types of proper pipe_inode_info fields
authorAndrei Vagin <avagin@gmail.com>
Mon, 28 Feb 2022 23:02:21 +0000 (10:02 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 28 Feb 2022 23:02:21 +0000 (10:02 +1100)
commitef5e8be323f2828dc6b77e6168f0d2ddb71d2fb8
tree8be1ec2ad04b672f9789276827b688de39e98713
parent2f4392d91a48c5c7e6148d5dd3ac6b92be7b5330
fs/pipe.c: local vars have to match types of proper pipe_inode_info fields

head, tail, ring_size are declared as unsigned int, so all local variables
that operate with these fields have to be unsigned to avoid signed integer
overflow.

Right now, it isn't an issue because the maximum pipe size is limited by
1U<<31.

Link: https://lkml.kernel.org/r/20220106171946.36128-1-avagin@gmail.com
Signed-off-by: Andrei Vagin <avagin@gmail.com>
Suggested-by: Dmitry Safonov <0x7f454c46@gmail.com>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
fs/pipe.c