Commit 6a5f12b
net/pkt: Add a debug option to track free pkt access more easily
Now that net_pkt are accessed through a common r/w API, using below a
net_pkt_cursor, let's have an option that will reset this cursor once
the net_pkt is freed.
Result is instead of segfaulting on r/w access, these operations will
bail out properly. Subsequent, and logical (unless you have a leak
which is another issue) net_pkt_unref will tell you who/where the pkt
was freed. Without it, you will get a segfault for instance, but that
won't tell you the exact reason. This options can help you then.
Signed-off-by: Tomasz Bursztyka <[email protected]>1 parent 6596c30 commit 6a5f12b
2 files changed
+16
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
39 | 50 | | |
40 | 51 | | |
41 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
817 | 817 | | |
818 | 818 | | |
819 | 819 | | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
820 | 825 | | |
821 | 826 | | |
822 | 827 | | |
| |||
0 commit comments