]> git.baikalelectronics.ru Git - kernel.git/commit
fs/pipe.c: local vars have to match types of proper pipe_inode_info fields
authorAndrei Vagin <avagin@gmail.com>
Wed, 23 Mar 2022 23:06:20 +0000 (16:06 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Mar 2022 02:00:34 +0000 (19:00 -0700)
commit2b6bda5ca9db986bb34d54f3356cc40a4d0f72cb
treededc751485e68d4a1c265f391a8a9d47c0598d7f
parent85e1ff626f3e1e1b1e832857208c53e78b8fb30d
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: Linus Torvalds <torvalds@linux-foundation.org>
fs/pipe.c