genirq: Properly pair kobject_del with kobject_add
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 12 lines · Michael Kelley
If
alloc_descsfails beforeirq_sysfs_inithas run,free_descin the cleanup path will callkobject_deleven though the kobject has not been added withkobject_add. Fix this by adding a newirq_sysfs_delfunction (within the #ifdefCONFIG_SYSFS) that conditionally callskobject_delbased on whetherirq_sysfs_inithas run.This problem surfaced because commit
aa30f47cf666("kobject: Add support for default attribute groups tokobj_type") makeskobject_delstricter about pairing withkobject_add. If the pairing is incorrrect, a WARNING and backtrace occur insysfs_remove_groupbecause there is no parent.
Quoted 6 lines
Signed-off-by Michael Kelley <[email protected]>---
Changes in v2:
* Fix compile error by creating a separateirq_sysfs_delfunction to do the conditional call tokobject_del, so that all references toirq_kobj_baseare under the #ifdefCONFIG_SYSFS.
Too late. I already fixed that up in the same way yesterday night:
The tip commit bot seems not to work right now, so you didn't get a notice.
Thanks,
tglx