Commit 975f05a
smb: server: call smb_direct_post_recv_credits() when the negotiation is done
We now activate sc->recv_io.posted.refill_work and sc->idle.immediate_work
only after a successful negotiation, before sending the negotiation
response.
It means the queue_work(sc->workqueue, &sc->recv_io.posted.refill_work)
in put_recvmsg() of the negotiate request, is a no-op now.
It also means our explicit smb_direct_post_recv_credits() will
have queue_work(sc->workqueue, &sc->idle.immediate_work) as no-op.
This should make sure we don't have races and post any immediate
data_transfer message that tries to grant credits to the peer,
before we send the negotiation response, as that will grant
the initial credits to the peer.
Fixes: 0626e66 ("cifsd: add server handler for central processing and tranport layers")
Fixes: 1cde0a7 ("smb: server: don't use delayed_work for post_recv_credits_work")
Cc: Namjae Jeon <[email protected]>
Cc: Steve French <[email protected]>
Cc: Tom Talpey <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Stefan Metzmacher <[email protected]>
Acked-by: Namjae Jeon <[email protected]>
Signed-off-by: Steve French <[email protected]>1 parent 6f40e50 commit 975f05a
1 file changed
Lines changed: 28 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | 421 | | |
425 | 422 | | |
426 | 423 | | |
| |||
1904 | 1901 | | |
1905 | 1902 | | |
1906 | 1903 | | |
1907 | | - | |
1908 | 1904 | | |
1909 | 1905 | | |
1910 | 1906 | | |
| |||
2249 | 2245 | | |
2250 | 2246 | | |
2251 | 2247 | | |
2252 | | - | |
2253 | | - | |
| 2248 | + | |
| 2249 | + | |
2254 | 2250 | | |
2255 | 2251 | | |
2256 | 2252 | | |
| |||
2265 | 2261 | | |
2266 | 2262 | | |
2267 | 2263 | | |
2268 | | - | |
2269 | | - | |
| 2264 | + | |
2270 | 2265 | | |
2271 | 2266 | | |
2272 | 2267 | | |
2273 | 2268 | | |
2274 | 2269 | | |
2275 | 2270 | | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
| 2282 | + | |
| 2283 | + | |
| 2284 | + | |
| 2285 | + | |
| 2286 | + | |
| 2287 | + | |
| 2288 | + | |
| 2289 | + | |
| 2290 | + | |
| 2291 | + | |
| 2292 | + | |
| 2293 | + | |
| 2294 | + | |
| 2295 | + | |
2276 | 2296 | | |
2277 | 2297 | | |
2278 | 2298 | | |
| |||
0 commit comments