diff options
| author | Stefan Haberland <sth@linux.ibm.com> | 2026-11-12 11:26:07 +0100 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-11-12 09:18:11 -0700 |
| commit | df56f7a6c20a5eb2794c0a7391bde50ba7c8c54b (patch) | |
| tree | 99c8b95dc962ed56a11804098677dcb627b481a3 /rust/kernel/alloc/kvec/errors.rs | |
| parent | 25cdc1f63227a1ea69a1ec823a8a860e33299169 (diff) | |
s390/dasd: Fix wrong free and refcount leak in build_check_tcw error path
dasd_eckd_build_check_tcw() allocates its request with
dasd_fmalloc_request(), but its out_err path frees it with
dasd_sfree_request(). The latter uses a different pool and therefor,
leading to invalid pointer arithmetic and a crash.
Use the matching dasd_ffree_request() instead.
The same error path also leaves start_priv->count incremented
without ever decrementing it again.
This leaks a permanent reference on every build failure.
Decrement it before freeing the request.
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260722103704.1709668-1-sth@linux.ibm.com
Fixes: 8fd575200db5 ("s390/dasd: Add new ioctl BIODASDCHECKFMT")
Cc: stable@vger.kernel.org #4.7
Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com>
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Fixes: 5e2b17e712cf ("s390/dasd: Add dynamic formatting support for ESE volumes")
Link: https://patch.msgid.link/20261112102608.1057852-4-sth@linux.ibm.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions
