-- mod->arch.core_plt_offset = 0;
-- mod->arch.core_plt_size = core_size;
-- mod->arch.init_plt_offset = core_size;
-- mod->arch.plt_tbl = kmalloc(core_size + init_size, GFP_KERNEL);
-- if (!mod->arch.plt_tbl)
+- mod->arch.phys_plt_offset = 0;
+- mod->arch.virt_plt_offset = 0;
+- mod->arch.phys_plt_tbl = NULL;
+- mod->arch.virt_plt_tbl = NULL;
+-
+- if ((core_size + init_size) == 0)
+- return 0;
+-
+- mod->arch.phys_plt_tbl = __module_alloc(core_size + init_size, 1);
+- if (!mod->arch.phys_plt_tbl)
+- return -ENOMEM;
+-
+- mod->arch.virt_plt_tbl = __module_alloc(core_size + init_size, 0);
+- if (!mod->arch.virt_plt_tbl) {
+- __module_free(mod->arch.phys_plt_tbl);
+- mod->arch.phys_plt_tbl = NULL;