diff options
| author | Vineet Agarwal <agarwal.vineet2006@gmail.com> | 2026-05-04 11:13:13 +0300 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-06-03 01:22:15 +0300 |
| commit | 13f263b60fee0c463f3a9a6c728cd010d8802d69 (patch) | |
| tree | ed0f946864d727f4b87a805f0a0b9b212e21893b /include/linux | |
| parent | 8e0c2085c978ed6d9764d79fc785920360096f21 (diff) | |
| download | linux-13f263b60fee0c463f3a9a6c728cd010d8802d69.tar.xz | |
selftests/mm: ksm-functional-tests: fix partial write handling
Update write() checks to properly detect and handle partial writes.
Previously, the write() calls used <= 0 to detect failure. This condition
is never true for partial writes (ret > 0 but ret < len), so partial
writes were silently treated as success.
Fix this by verifying that write() returns the full expected length and
treating any mismatch as failure.
Link: https://lore.kernel.org/20260504081638.683223-1-agarwal.vineet2006@gmail.com
Signed-off-by: Vineet Agarwal <agarwal.vineet2006@gmail.com>
Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Cc: Liam Howlett <liam@infradead.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
