当前位置: 技术问答>linux和unix
如何看懂打补丁后的.rej文件
来源: 互联网 发布时间:2016-12-26
本文导语: *************** *** 1874,1879 **** arch_cleanup: module_arch_cleanup(mod); cleanup: module_unload_free(mod); module_free(mod, mod->module_init); free_core: --- 1921,1931 ---- arch_cleanup: module_arch_cleanup(mod); cleanup: + +...
***************
*** 1874,1879 ****
arch_cleanup:
module_arch_cleanup(mod);
cleanup:
module_unload_free(mod);
module_free(mod, mod->module_init);
free_core:
--- 1921,1931 ----
arch_cleanup:
module_arch_cleanup(mod);
cleanup:
+
+ #ifdef CONFIG_KGDB
+ nomodsectinfo:
+ vfree(mod->mod_sections);
+ #endif
module_unload_free(mod);
module_free(mod, mod->module_init);
free_core:
***************
*** 1947,1952 ****
/* Init routine failed: abort. Try to protect us from
buggy refcounters. */
mod->state = MODULE_STATE_GOING;
synchronize_sched();
if (mod->unsafe)
printk(KERN_ERR "%s: module is now stuck!n",
--- 1999,2008 ----
/* Init routine failed: abort. Try to protect us from
buggy refcounters. */
mod->state = MODULE_STATE_GOING;
+ down(¬ify_mutex);
+ notifier_call_chain(&module_notify_list, MODULE_STATE_GOING,
+ mod);
+ up(¬ify_mutex);
synchronize_sched();
if (mod->unsafe)
printk(KERN_ERR "%s: module is now stuck!n",
*** 1874,1879 ****
arch_cleanup:
module_arch_cleanup(mod);
cleanup:
module_unload_free(mod);
module_free(mod, mod->module_init);
free_core:
--- 1921,1931 ----
arch_cleanup:
module_arch_cleanup(mod);
cleanup:
这段什么意思啊?
+
+ #ifdef CONFIG_KGDB
+ nomodsectinfo:
+ vfree(mod->mod_sections);
+ #endif
加号表示在原文件处增加相应代码?
*** 1874,1879 ****
arch_cleanup:
module_arch_cleanup(mod);
cleanup:
module_unload_free(mod);
module_free(mod, mod->module_init);
free_core:
--- 1921,1931 ----
arch_cleanup:
module_arch_cleanup(mod);
cleanup:
+
+ #ifdef CONFIG_KGDB
+ nomodsectinfo:
+ vfree(mod->mod_sections);
+ #endif
module_unload_free(mod);
module_free(mod, mod->module_init);
free_core:
***************
*** 1947,1952 ****
/* Init routine failed: abort. Try to protect us from
buggy refcounters. */
mod->state = MODULE_STATE_GOING;
synchronize_sched();
if (mod->unsafe)
printk(KERN_ERR "%s: module is now stuck!n",
--- 1999,2008 ----
/* Init routine failed: abort. Try to protect us from
buggy refcounters. */
mod->state = MODULE_STATE_GOING;
+ down(¬ify_mutex);
+ notifier_call_chain(&module_notify_list, MODULE_STATE_GOING,
+ mod);
+ up(¬ify_mutex);
synchronize_sched();
if (mod->unsafe)
printk(KERN_ERR "%s: module is now stuck!n",
*** 1874,1879 ****
arch_cleanup:
module_arch_cleanup(mod);
cleanup:
module_unload_free(mod);
module_free(mod, mod->module_init);
free_core:
--- 1921,1931 ----
arch_cleanup:
module_arch_cleanup(mod);
cleanup:
这段什么意思啊?
+
+ #ifdef CONFIG_KGDB
+ nomodsectinfo:
+ vfree(mod->mod_sections);
+ #endif
加号表示在原文件处增加相应代码?
|
如果patch和源码语句/位置相差过大就会生成rej文件
此时你需要手动打补丁
此时你需要手动打补丁
|
补丁针对的版本不对, 或者是多个补丁,补丁的顺序不对.