diff options
| author | David Howells <[email protected]> | 2024-12-13 13:50:03 +0000 |
|---|---|---|
| committer | Christian Brauner <[email protected]> | 2024-12-20 21:07:56 +0000 |
| commit | 105549d09a539a876b7c3330ab52d8aceedad358 (patch) | |
| tree | 93258e5fc0cff2c98632c6b34e412106859de9b2 /drivers/gpu/drm/amd/amdgpu/amdgpu_fw_attestation.c | |
| parent | netfs: Fix non-contiguous donation between completed reads (diff) | |
| download | kernel-105549d09a539a876b7c3330ab52d8aceedad358.tar.gz kernel-105549d09a539a876b7c3330ab52d8aceedad358.zip | |
netfs: Fix enomem handling in buffered reads
If netfs_read_to_pagecache() gets an error from either ->prepare_read() or
from netfs_prepare_read_iterator(), it needs to decrement ->nr_outstanding,
cancel the subrequest and break out of the issuing loop. Currently, it
only does this for two of the cases, but there are two more that aren't
handled.
Fix this by moving the handling to a common place and jumping to it from
all four places. This is in preference to inserting a wrapper around
netfs_prepare_read_iterator() as proposed by Dmitry Antipov[1].
Link: https://lore.kernel.org/r/[email protected]/ [1]
Fixes: ee4cdf7ba857 ("netfs: Speed up buffered reading")
Reported-by: [email protected]
Closes: https://syzkaller.appspot.com/bug?extid=404b4b745080b6210c6c
Signed-off-by: David Howells <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Tested-by: [email protected]
cc: Dmitry Antipov <[email protected]>
cc: Jeff Layton <[email protected]>
cc: [email protected]
cc: [email protected]
Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_fw_attestation.c')
0 files changed, 0 insertions, 0 deletions
