BB: ubox: fix segmentation fault in insmod
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 26 Feb 2015 21:29:57 +0000 (21:29 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 26 Feb 2015 21:29:57 +0000 (21:29 +0000)
Fix segfault in kmodloader insmod mode due to uninitialized module
directory list.

Apply the required fix as patch for now since we don't have the
ulog infrastructure in BB (yet) required for the git head of ubox.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 44550

package/system/ubox/Makefile
package/system/ubox/patches/100-insmod-segfault.patch [new file with mode: 0644]

index 471afd6dc04a84240bf5b1bbfe40652a10c47218..2d7ed29741deedb8a5cf9505efa89ae8ad744365 100644 (file)
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ubox
-PKG_VERSION:=2015-02-25
+PKG_VERSION:=2015-02-25.1
 PKG_RELEASE=$(PKG_SOURCE_VERSION)
 
 PKG_SOURCE_PROTO:=git
diff --git a/package/system/ubox/patches/100-insmod-segfault.patch b/package/system/ubox/patches/100-insmod-segfault.patch
new file mode 100644 (file)
index 0000000..df010d1
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/kmodloader.c
++++ b/kmodloader.c
+@@ -605,6 +605,9 @@ static int main_insmod(int argc, char **
+               cur += sprintf(cur, "%s", argv[i]);
+       }
++      if (init_module_folders())
++              return -1;
++
+       if (get_module_path(argv[1])) {
+               name = argv[1];
+       } else if (!get_module_path(name)) {