+63
−0
+26
−0
Loading
mainline inclusion from mainline-v6.10-rc1 commit 4edd7e96a1f159f43bd1cb82616f81eaddd54262 category: feature bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAOXYG CVE: CVE-2024-44951 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4edd7e96a1f159f43bd1cb82616f81eaddd54262 -------------------------------- kfifo: add kfifo_out_linear{,_ptr}() These are helpers which are going to be used in the serial layer. We need a wrapper around kfifo which provides us with a tail (sometimes "tail" offset, sometimes a pointer) to the kfifo data. And which returns count of available data -- but not larger than to the end of the buffer (hence _linear in the names). I.e. something like CIRC_CNT_TO_END() in the legacy circ_buf. This patch adds such two helpers. Signed-off-by:Jiri Slaby (SUSE) <jirislaby@kernel.org> Cc: Stefani Seibold <stefani@seibold.net> Cc: Andrew Morton <akpm@linux-foundation.org> Link: https://lore.kernel.org/r/20240405060826.2521-4-jirislaby@kernel.org Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Zhao Yipeng <zhaoyipeng5@huawei.com>