Repository navigation
Commit 36453c8
llc: fix sk_buff refcounting in llc_conn_state_process()
If llc_conn_state_process() sees that llc_conn_service() put the skb on
a list, it will drop one fewer references to it. This is wrong because
the current behavior is that llc_conn_service() never consumes a
reference to the skb.
The code also makes the number of skb references being dropped
conditional on which of ind_prim and cfm_prim are nonzero, yet neither
of these affects how many references are *acquired*. So there is extra
code that tries to fix this up by sometimes taking another reference.
Remove the unnecessary/broken refcounting logic and instead just add an
skb_get() before the only two places where an extra reference is
actually consumed.
Fixes: 1da177e ("Linux-2.6.12-rc2")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>1 parent fc8d5db commit 36453c8
1 file changed
Lines changed: 6 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | 67 | | |
74 | 68 | | |
75 | 69 | | |
76 | 70 | | |
77 | 71 | | |
78 | 72 | | |
79 | 73 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | 74 | | |
88 | 75 | | |
89 | 76 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | 77 | | |
94 | 78 | | |
| 79 | + | |
95 | 80 | | |
96 | 81 | | |
97 | 82 | | |
| |||
108 | 93 | | |
109 | 94 | | |
110 | 95 | | |
| 96 | + | |
111 | 97 | | |
112 | 98 | | |
113 | 99 | | |
| |||
123 | 109 | | |
124 | 110 | | |
125 | 111 | | |
126 | | - | |
127 | 112 | | |
128 | 113 | | |
129 | 114 | | |
| |||
132 | 117 | | |
133 | 118 | | |
134 | 119 | | |
135 | | - | |
136 | 120 | | |
137 | 121 | | |
138 | | - | |
| 122 | + | |
139 | 123 | | |
140 | 124 | | |
141 | | - | |
142 | | - | |
143 | 125 | | |
144 | 126 | | |
145 | 127 | | |
| |||
181 | 163 | | |
182 | 164 | | |
183 | 165 | | |
184 | | - | |
| 166 | + | |
185 | 167 | | |
186 | 168 | | |
187 | | - | |
188 | | - | |
189 | | - | |
| 169 | + | |
| 170 | + | |
190 | 171 | | |
191 | | - | |
192 | | - | |
193 | 172 | | |
194 | 173 | | |
195 | 174 | | |
| |||
0 commit comments