Skip to content

Commit

Permalink
Fix issue #38
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam-pi3 committed Jan 13, 2021
1 parent 9dcee1e commit 8814ebe
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/modules/kmod/p_kmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,18 @@ static int p_list_from_sysfs_kobj(p_module_kobj_mem *p_arg) {
memcpy(&p_arg[p_cnt].kobj,p_kobj,sizeof(struct kobject));
/* Exception */
memset(&p_arg[p_cnt].kobj.entry,0,sizeof(struct list_head)); // module GOING_AWAY trobules ;(
memset(&p_arg[p_cnt].kobj.kref,0,sizeof(struct kref)); // module GOING_AWAY trobules ;(

memset(&p_arg[p_cnt].kobj.kref,0,sizeof(struct kref)); // module GOING_AWAY trobules ;(
/*
* Commit 38dc717e9715 ("module: delay kobject uevent until after module init call")
* delayed the kobject uevent unnecessarily too far to until after sending a
* MODULE_STATE_LIVE notification. As the uevent modifies internal state of the KOBJ
* itself, this violated the assumption that the KOBJ remains consistent and can be
* integrity-checked as soon as the module is LIVE.
* To be able to correctly handle this situation, unstable attributes are not verified.
*/
p_arg[p_cnt].kobj.state_add_uevent_sent = 0;
p_arg[p_cnt].kobj.state_remove_uevent_sent = 0;
p_arg[p_cnt].kobj.uevent_suppress = 0;

/* Pointer to THIS_MODULE per module */
p_arg[p_cnt].p_mod = p_mod;
Expand Down

1 comment on commit 8814ebe

@solardiz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, going forward let's consistently use descriptive commit messages. Something like "Fixes #38" is great to include in there, but it must not be the only content of the commit message at least because it'd become almost meaningless if/when LKRG is no longer on GitHub, just like the references to BitBucket PRs became obsolete when we moved to GitHub.

Please sign in to comment.