Sabrina Dubroca
a32f1923c6
crypto: scompress - increment scomp_scratch_users when already allocated
...
Commit ddd0a42671 only increments scomp_scratch_users when it was 0,
causing a panic when using ipcomp:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1 ] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 UID: 0 PID: 619 Comm: ping Tainted: G N 6.15.0-rc3-net-00032-ga79be02bba5c #41 PREEMPT(full)
Tainted: [N]=TEST
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Arch Linux 1.16.3-1-1 04/01/2014
RIP: 0010:inflate_fast+0x5a2/0x1b90
[...]
Call Trace:
<IRQ>
zlib_inflate+0x2d60/0x6620
deflate_sdecompress+0x166/0x350
scomp_acomp_comp_decomp+0x45f/0xa10
scomp_acomp_decompress+0x21/0x120
acomp_do_req_chain+0x3e5/0x4e0
ipcomp_input+0x212/0x550
xfrm_input+0x2de2/0x72f0
[...]
Kernel panic - not syncing: Fatal exception in interrupt
Kernel Offset: disabled
---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---
Instead, let's keep the old increment, and decrement back to 0 if the
scratch allocation fails.
Fixes: ddd0a42671 ("crypto: scompress - Fix scratch allocation failure handling")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net >
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au >
2025-04-25 10:33:30 +08:00
..
2025-02-09 18:08:12 +08:00
2025-03-15 15:08:53 +08:00
2025-03-21 17:33:38 +08:00
2025-03-21 17:39:06 +08:00
2025-03-22 07:25:19 +08:00
2024-12-02 11:34:44 -08:00
2025-02-22 15:56:03 +08:00
2025-03-15 16:21:22 +08:00
2023-05-24 18:12:33 +08:00
2023-05-24 18:12:33 +08:00
2023-05-24 18:12:33 +08:00
2024-10-02 17:23:23 -04:00
2022-12-02 18:12:40 +08:00
2024-05-31 17:34:56 +08:00
2025-04-12 09:33:09 +08:00
2024-10-05 13:22:04 +08:00
2025-03-21 17:39:06 +08:00
2024-09-06 14:50:46 +08:00
2023-06-24 15:50:13 -07:00
2024-05-31 17:34:56 +08:00
2023-06-24 15:50:13 -07:00
2024-05-31 17:34:56 +08:00
2024-12-02 11:34:44 -08:00
2024-12-14 17:21:43 +08:00
2025-03-21 17:39:06 +08:00
2023-12-08 11:59:46 +08:00
2024-12-14 17:21:43 +08:00
2023-10-27 18:04:29 +08:00
2023-10-27 18:04:29 +08:00
2024-10-02 17:23:23 -04:00
2022-12-02 18:12:40 +08:00
2024-10-02 17:23:23 -04:00
2025-03-02 15:19:43 +08:00
2024-10-02 17:23:23 -04:00
2024-10-02 17:23:23 -04:00
2024-10-02 17:23:23 -04:00
2024-05-31 17:34:56 +08:00
2024-02-02 18:08:12 +08:00
2024-12-02 11:34:44 -08:00
2024-08-17 13:55:49 +08:00
2025-03-21 17:39:06 +08:00
2024-12-02 11:34:44 -08:00
2024-12-02 11:34:44 -08:00
2025-03-15 16:21:22 +08:00
2024-12-01 17:23:01 -08:00
2025-02-08 20:06:30 -08:00
2023-10-13 18:27:26 +08:00
2025-01-08 18:15:03 +01:00
2025-03-21 17:39:06 +08:00
2025-03-21 17:39:06 +08:00
2025-03-15 16:21:22 +08:00
2023-10-13 18:27:27 +08:00
2024-05-31 17:34:56 +08:00
2025-03-21 17:39:06 +08:00
2022-12-02 18:12:40 +08:00
2022-03-03 10:47:50 +12:00
2024-08-17 13:55:50 +08:00
2024-12-02 11:34:44 -08:00
2024-12-02 11:34:44 -08:00
2024-04-12 15:07:52 +08:00
2025-02-09 18:08:12 +08:00
2024-04-26 17:26:09 +08:00
2025-02-09 18:08:12 +08:00
2025-02-09 18:08:12 +08:00
2024-10-05 13:22:05 +08:00
2024-04-12 15:07:52 +08:00
2024-10-05 13:22:05 +08:00
2025-03-21 17:39:06 +08:00
2022-12-02 18:12:40 +08:00
2025-01-28 13:48:37 +01:00
2023-10-27 18:04:29 +08:00
2023-10-27 18:04:30 +08:00
2024-04-02 10:49:38 +08:00
2024-12-02 11:34:44 -08:00
2025-03-20 16:53:53 -07:00
2023-10-27 18:04:24 +08:00
2025-03-15 16:21:22 +08:00
2024-04-05 15:46:33 +08:00
2024-10-19 08:44:30 +08:00
2024-08-30 18:22:30 +08:00
2024-10-19 08:44:30 +08:00
2025-03-29 10:01:55 -07:00
2022-11-25 17:39:18 +08:00
2024-12-14 17:21:44 +08:00
2024-04-02 10:49:38 +08:00
2025-03-02 21:39:34 +00:00
2025-03-15 16:21:22 +08:00
2024-04-02 10:49:38 +08:00
2025-03-21 17:39:06 +08:00
2025-03-21 17:39:06 +08:00
2025-03-21 17:39:06 +08:00
2025-03-21 17:39:06 +08:00
2025-03-29 10:01:55 -07:00
2024-10-02 17:23:23 -04:00
2024-10-02 17:23:23 -04:00
2025-03-15 16:21:22 +08:00
2024-10-28 18:32:36 +08:00
2024-10-02 17:23:23 -04:00
2024-10-02 17:23:23 -04:00
2025-03-21 17:39:06 +08:00
2024-04-02 10:49:38 +08:00
2024-10-05 13:22:04 +08:00
2024-10-05 13:22:04 +08:00
2023-10-27 18:04:28 +08:00
2023-10-27 18:04:28 +08:00
2025-02-09 18:08:12 +08:00
2025-03-15 16:21:22 +08:00
2025-04-25 10:33:30 +08:00
2024-12-14 17:21:44 +08:00
2023-02-13 18:35:14 +08:00
2024-10-02 17:23:23 -04:00
2024-10-02 17:23:23 -04:00
2024-10-02 17:23:23 -04:00
2024-10-02 17:23:23 -04:00
2024-04-02 10:49:38 +08:00
2024-12-10 13:44:21 +08:00
2024-08-24 21:39:15 +08:00
2025-03-21 17:33:38 +08:00
2024-04-02 10:49:38 +08:00
2024-10-02 17:23:23 -04:00
2024-10-02 17:23:23 -04:00
2024-10-02 17:23:23 -04:00
2024-10-02 17:23:23 -04:00
2025-03-29 10:01:55 -07:00
2023-01-20 18:29:31 +08:00
2024-12-14 17:21:43 +08:00
2025-04-19 11:07:58 +08:00
2025-03-29 10:01:55 -07:00
2022-12-02 18:12:40 +08:00
2024-10-02 17:23:23 -04:00
2022-12-30 22:56:27 +08:00
2024-12-02 11:34:44 -08:00
2025-03-15 16:21:22 +08:00
2024-08-02 20:53:25 +08:00
2025-03-15 16:21:22 +08:00
2024-10-02 17:23:23 -04:00
2025-03-21 17:39:06 +08:00