[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260122041450.2325560-1-s9430939@naver.com>
Date: Thu, 22 Jan 2026 13:14:47 +0900
From: Minu Jin <s9430939@...er.com>
To: gregkh@...uxfoundation.org
Cc: andriy.shevchenko@...ux.intel.com,
abrahamadekunle50@...il.com,
zxcv2569763104@...il.com,
milospuric856@...il.com,
karanja99erick@...il.com,
weibu@...admin.org,
dan.carpenter@...aro.org,
linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org,
Minu Jin <s9430939@...er.com>
Subject: [PATCH v5 0/3] staging: rtl8723bs: improve error handling in _rtw_pktfile_read
This patch series improves the error handling and data integrity of
_rtw_pktfile_read() by preventing unsafe partial reads and ensuring
proper error propagation.
Previously, _rtw_pktfile_read() allowed partial reads when requested
data was insufficient, which could lead to incomplete packet parsing
and potential errors in callers. This series updates the function to
only update internal pointers when a full read is successful, and
updates all callers to handle the new error codes correctly.
I do not have the physical hardware to test this, so I have carefully
reviewed every place where _rtw_pktfile_read() is used in this driver.
I have also confirmed that the driver builds without any errors or
warnings with these patches applied.
Changes since v4:
- Split the single large patch into a 3-patch series as suggested by
Greg Kroah-Hartman to ensure each patch performs one logical task.
- Patch 1: Refactor return type to 'int' and replace non-standard 'uint'
parameter with 'unsigned int' for better type consistency and to
prepare for error propagation.
- Patch 2: Add missing error checks and update existing handlers to
correctly recognize negative error codes. This includes inserting
new checks after _rtw_pktfile_read() and updating existing
'== _FAIL' logic to '!= _SUCCESS' to ensure all failures are caught.
- Patch 3: Implement the core logic to prevent partial reads and
return -EINVAL when data is insufficient.
--
2.43.0
Powered by blists - more mailing lists