Commit 67222c4
lib: parser: optimize match_NUMBER apis to use local array
Memory will be allocated to store substring_t in match_strdup(), which
means the caller of match_strdup() may need to be scheduled out to wait
for reclaiming memory. smatch complains that this can cuase sleeping in
an atoic context.
Using local array to store substring_t to remove the restriction.
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lore.kernel.org/all/[email protected]/
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 2c06479 ("blk-iocost: don't release 'ioc->lock' while updating params")
Signed-off-by: Li Lingfeng <[email protected]>
Reported-by: Yu Kuai <[email protected]>
Acked-by: Tejun Heo <[email protected]>
Cc: BingJing Chang <[email protected]>
Cc: Eric Biggers <[email protected]>
Cc: Hou Tao <[email protected]>
Cc: James Smart <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: yangerkun <[email protected]>
Cc: Zhang Yi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>1 parent badc28d commit 67222c4
1 file changed
+20
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
14 | 23 | | |
15 | 24 | | |
16 | 25 | | |
| |||
129 | 138 | | |
130 | 139 | | |
131 | 140 | | |
132 | | - | |
| 141 | + | |
133 | 142 | | |
134 | 143 | | |
135 | 144 | | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
| 145 | + | |
| 146 | + | |
140 | 147 | | |
141 | 148 | | |
142 | 149 | | |
| |||
145 | 152 | | |
146 | 153 | | |
147 | 154 | | |
148 | | - | |
149 | 155 | | |
150 | 156 | | |
151 | 157 | | |
| |||
163 | 169 | | |
164 | 170 | | |
165 | 171 | | |
166 | | - | |
| 172 | + | |
167 | 173 | | |
168 | 174 | | |
169 | 175 | | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
| 176 | + | |
| 177 | + | |
174 | 178 | | |
175 | 179 | | |
176 | 180 | | |
177 | | - | |
178 | 181 | | |
179 | 182 | | |
180 | 183 | | |
| |||
206 | 209 | | |
207 | 210 | | |
208 | 211 | | |
209 | | - | |
210 | | - | |
| 212 | + | |
211 | 213 | | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
217 | 218 | | |
218 | 219 | | |
219 | 220 | | |
| |||
0 commit comments