[LU-11887] OBD_FREE macro issues with OBD_DEBUG_MEMUSAGE and CONFIG_DEBUG_SLAB Created: 25/Jan/19 Updated: 04/Sep/19 |
|
| Status: | Open |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Patrick Farrell (Inactive) | Assignee: | WC Triage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
There's some weirdness with the OBD_FREE family of macros, and at least one bug. First item is more of a style thing, but: The OBD_FREE macros do in their default version, and this behavior is used (inconsistently), but if OBD_DEBUG_MEMUSAGE is on, they do not, because OBD_FREE_PRE asserts the pointer is not null. We should fix that in OBD_DEBUG_MEMUSAGE; Then, next: There are several bugs with POISON_PTR. If OBD_DEBUG_MEMUSAGE is on: if CONFIG_DEBUG_SLAB is on, POISON_PTR is enabled... And we call it after freeing the pointer in several places: #define OBD_FREE_LARGE(ptr, size) \ else {
Yuck! I'll see about doing patches for this at some point. |