mirror of https://gitee.com/openkylin/linux.git
dma-mapping fix for 5.11
- fix a kernel crash in the new dma-mapping benchmark test (Barry Song) -----BEGIN PGP SIGNATURE----- iQI/BAABCgApFiEEgdbnc3r/njty3Iq9D55TZVIEUYMFAmAZGkkLHGhjaEBsc3Qu ZGUACgkQD55TZVIEUYNF0A//WjFHsPCMbbhlOlCMcRD/I1+JLQYchjlWp48wAzxq K3fmGnLlsvd3lCyUQzLLcUMSs+NsaTlzNNtH+MSNfGvX3x/8Mz9F57AgJ7C2xlaD XXbob5SKAqls6UFw6sBhlNbUe/l3Tup7LgqyCqQGRfpftycO7Vk70oHfFir0xqeB IX2s2s9UK+iePRtqfhyOylipIPXG3A3TnDJ+T3x5wsw6m4ejr8TVUVNsA1Xg0mha xsMVELyPwp3pEYp0+LNZsvtRC6uv7MeNf11mqmtk9VOZtrnS1VsD+ZPeNXzoCP3n 5iipcFGeiz8ac2bdldIjwYa4wyIBZR1kOOQ+1+gq42/Hs/Eu9N3aQydhgrzw8ZnY MxUHbHazhpB2qt2lxyMjODVRKFdEt2FrkP7a7d3guw2Il4o2f14g9MZS72c5H5jk Vg90VSW8UQr51MKamZkgLeIgFaqVTOkgXO5h7e+dfD/XMgm4Vt3qsjcBSQfTcCrj 4efmJwUvyv8x13HXoSvistKXG6kTH+rBtbxD6RvzE2C9dasb5L3mYIj+loQJqU7+ u/+X9ZUVHTvXlH7j7Fc9vBgCUf0VlZJ8N3LXl5zN7zRP40vcvudlhyNj1PWhiUlu G5RBhuyTm3jd+NqCYE7XCqf+dvA7BGgkW2LZM/qAhlZgmJaWLwlJwAe0XA0KR9uR U5w= =l+IX -----END PGP SIGNATURE----- Merge tag 'dma-mapping-5.11-1' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fix from Christoph Hellwig: "Fix a kernel crash in the new dma-mapping benchmark test (Barry Song)" * tag 'dma-mapping-5.11-1' of git://git.infradead.org/users/hch/dma-mapping: dma-mapping: benchmark: fix kernel crash when dma_map_single fails
This commit is contained in:
commit
7d36ccd4bd
|
@ -147,8 +147,10 @@ static int do_map_benchmark(struct map_benchmark_data *map)
|
|||
atomic64_set(&map->sum_sq_unmap, 0);
|
||||
atomic64_set(&map->loops, 0);
|
||||
|
||||
for (i = 0; i < threads; i++)
|
||||
for (i = 0; i < threads; i++) {
|
||||
get_task_struct(tsk[i]);
|
||||
wake_up_process(tsk[i]);
|
||||
}
|
||||
|
||||
msleep_interruptible(map->bparam.seconds * 1000);
|
||||
|
||||
|
@ -183,6 +185,8 @@ static int do_map_benchmark(struct map_benchmark_data *map)
|
|||
}
|
||||
|
||||
out:
|
||||
for (i = 0; i < threads; i++)
|
||||
put_task_struct(tsk[i]);
|
||||
put_device(map->dev);
|
||||
kfree(tsk);
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue