!1259 [sync] PR-1224: check if mem_init returns errno
From: @openeuler-sync-bot Reviewed-by: @jiangheng12 Signed-off-by: @jiangheng12
This commit is contained in:
commit
fb2f11e70d
32
0162-check-if-mem_init-returns-errno.patch
Normal file
32
0162-check-if-mem_init-returns-errno.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From d62c3da349d4e255d1f81b2f28db938027a1b73a Mon Sep 17 00:00:00 2001
|
||||
From: yinbin <yinbin8@huawei.com>
|
||||
Date: Tue, 20 Aug 2024 19:05:43 +0800
|
||||
Subject: [PATCH] check if mem_init returns errno
|
||||
|
||||
---
|
||||
src/core/init.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/core/init.c b/src/core/init.c
|
||||
index dbe89d7..e6cd9b6 100644
|
||||
--- a/src/core/init.c
|
||||
+++ b/src/core/init.c
|
||||
@@ -357,9 +357,14 @@ lwip_init(void)
|
||||
sys_init();
|
||||
#endif /* !NO_SYS */
|
||||
mem_init();
|
||||
+#if GAZELLE_ENABLE
|
||||
+ /* mem_init() will set failed errno. */
|
||||
+ if (errno != 0)
|
||||
+ return;
|
||||
+#endif /* GAZELLE_ENABLE */
|
||||
memp_init();
|
||||
#if GAZELLE_ENABLE
|
||||
- /* mem_init() and memp_init() will set failed errno. */
|
||||
+ /* memp_init() will set failed errno. */
|
||||
if (errno != 0)
|
||||
return;
|
||||
#endif /* GAZELLE_ENABLE */
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
Summary: lwip is a small independent implementation of the TCP/IP protocol suite
|
||||
Name: lwip
|
||||
Version: 2.2.0
|
||||
Release: 52
|
||||
Release: 53
|
||||
License: BSD
|
||||
URL: http://savannah.nongnu.org/projects/lwip/
|
||||
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip
|
||||
@ -173,6 +173,7 @@ Patch9157: 0158-enable-sys_arch-failed-log.patch
|
||||
Patch9158: 0159-LOOPBACK-fix-loop-coredump.patch
|
||||
Patch9159: 0160-INIT-fix-lwip_init-failed-because-of-dpdk-set-errno.patch
|
||||
Patch9160: 0161-fix-the-definition-of-IPV6_V6ONLY.patch
|
||||
Patch9161: 0162-check-if-mem_init-returns-errno.patch
|
||||
|
||||
BuildRequires: gcc-c++ dos2unix dpdk-devel
|
||||
|
||||
@ -202,6 +203,9 @@ cd %{_builddir}/%{name}-%{version}/src
|
||||
%{_libdir}/liblwip.a
|
||||
|
||||
%changelog
|
||||
* Tue Aug 20 2024 yinbin <yinbin8@huawei.com> - 2.2.0-53
|
||||
- check if mem_init returns errno
|
||||
|
||||
* Tue Aug 13 2024 yangchen <yangchen145@huawei.com> - 2.2.0-52
|
||||
- fix the definition of IPV6_V6ONLY
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user