diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-12-21 09:29:46 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-12-21 09:29:46 -0800 |
commit | 7684392f17b05a9881a5f05b6ca5684321598140 (patch) | |
tree | aa970810f6c2b6994169c11aceb9d8aa40ca7d8b /net | |
parent | 499551201b5f4fd3c0618a3e95e3d0d15ea18f31 (diff) | |
parent | 18d44c5d062b97b97bb0162d9742440518958dc1 (diff) | |
download | lwn-7684392f17b05a9881a5f05b6ca5684321598140.tar.gz lwn-7684392f17b05a9881a5f05b6ca5684321598140.zip |
Merge tag 'ceph-for-6.13-rc4' of https://github.com/ceph/ceph-client
Pull ceph fixes from Ilya Dryomov:
"A handful of important CephFS fixes from Max, Alex and myself: memory
corruption due to a buffer overrun, potential infinite loop and
several memory leaks on the error paths. All but one marked for
stable"
* tag 'ceph-for-6.13-rc4' of https://github.com/ceph/ceph-client:
ceph: allocate sparse_ext map only for sparse reads
ceph: fix memory leak in ceph_direct_read_write()
ceph: improve error handling and short/overflow-read logic in __ceph_sync_read()
ceph: validate snapdirname option length when mounting
ceph: give up on paths longer than PATH_MAX
ceph: fix memory leaks in __ceph_sync_read()
Diffstat (limited to 'net')
-rw-r--r-- | net/ceph/osd_client.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 9b1168eb77ab..b24afec24138 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -1173,6 +1173,8 @@ EXPORT_SYMBOL(ceph_osdc_new_request); int __ceph_alloc_sparse_ext_map(struct ceph_osd_req_op *op, int cnt) { + WARN_ON(op->op != CEPH_OSD_OP_SPARSE_READ); + op->extent.sparse_ext_cnt = cnt; op->extent.sparse_ext = kmalloc_array(cnt, sizeof(*op->extent.sparse_ext), |