Miaohe Lin
06a6d6c51e
mm/mmap.c: fix missing call to vm_unacct_memory in mmap_region
...
[ Upstream commit 7f82f922319ede486540e8746769865b9508d2c2 ]
Since the beginning, charged is set to 0 to avoid calling vm_unacct_memory
twice because vm_unacct_memory will be called by above unmap_region. But
since commit 4f74d2c8e827 ("vm: remove 'nr_accounted' calculations from
the unmap_vmas() interfaces"), unmap_region doesn't call vm_unacct_memory
anymore. So charged shouldn't be set to 0 now otherwise the calling to
paired vm_unacct_memory will be missed and leads to imbalanced account.
Link: https://lkml.kernel.org/r/20220618082027.43391-1-linmiaohe@huawei.com
Fixes: 4f74d2c8e827 ("vm: remove 'nr_accounted' calculations from the unmap_vmas() interfaces")
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-08-25 11:11:23 +02:00
..
2018-08-24 13:09:12 +02:00
2021-12-14 10:16:54 +01:00
2018-10-13 09:27:30 +02:00
2017-11-02 11:10:55 +01:00
2019-06-15 11:54:51 +02:00
2019-08-06 19:05:23 +02:00
2017-11-02 11:10:55 +01:00
2019-10-05 12:48:13 +02:00
2017-11-02 11:10:55 +01:00
2018-09-19 22:43:48 +02:00
2018-02-25 11:08:03 +01:00
2018-09-15 09:45:28 +02:00
2017-11-02 11:10:55 +01:00
2020-10-01 13:12:40 +02:00
2018-03-03 10:24:21 +01:00
2021-04-28 12:08:42 +02:00
2017-11-02 11:10:55 +01:00
2019-01-13 10:01:02 +01:00
2021-07-20 16:17:41 +02:00
2019-11-20 17:59:33 +01:00
2022-06-14 16:53:54 +02:00
2017-11-02 11:10:55 +01:00
2021-07-11 12:48:10 +02:00
2019-06-15 11:54:51 +02:00
2018-02-22 15:42:24 +01:00
2021-05-22 10:57:39 +02:00
2022-04-20 09:08:32 +02:00
2021-05-22 10:57:39 +02:00
2019-06-19 08:20:54 +02:00
2020-09-09 19:03:11 +02:00
2018-10-10 08:54:22 +02:00
2018-02-22 15:42:24 +01:00
2022-03-02 11:34:00 +01:00
2022-04-20 09:08:25 +02:00
2021-09-22 11:45:34 +02:00
2021-06-30 08:48:48 -04:00
2022-07-21 20:42:48 +02:00
2022-07-29 17:06:50 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-04-03 06:25:20 +02:00
2019-05-21 18:50:16 +02:00
2019-07-10 09:54:36 +02:00
2022-08-25 11:11:23 +02:00
2019-07-31 07:28:56 +02:00
2017-11-02 11:10:55 +01:00
2020-03-11 18:03:02 +01:00
2022-04-20 09:08:29 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2020-04-02 16:34:20 +02:00
2021-11-26 11:40:37 +01:00
2022-04-27 13:15:29 +02:00
2017-11-02 11:10:55 +01:00
2019-04-05 22:31:27 +02:00
2019-07-03 13:15:59 +02:00
2021-03-07 11:27:46 +01:00
2017-11-02 11:10:55 +01:00
2020-07-31 16:44:45 +02:00
2019-04-05 22:31:28 +02:00
2021-07-11 12:48:12 +02:00
2020-01-23 08:20:32 +01:00
2020-10-01 13:12:32 +02:00
2017-11-02 11:10:55 +01:00
2019-02-12 19:46:05 +01:00
2018-04-08 14:26:29 +02:00
2020-09-23 10:46:36 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-09-09 19:55:53 +02:00
2022-04-20 09:08:29 +02:00
2022-03-08 19:01:58 +01:00
2020-06-30 15:38:08 -04:00
2019-06-15 11:54:51 +02:00
2021-11-26 11:40:40 +01:00
2017-11-02 11:10:55 +01:00
2022-07-12 16:27:28 +02:00
2017-11-02 11:10:55 +01:00
2018-05-16 10:10:27 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2020-10-01 13:12:46 +02:00
2021-03-07 11:27:46 +01:00
2018-12-08 13:03:40 +01:00
2019-10-11 18:18:34 +02:00
2022-05-15 19:40:27 +02:00
2022-06-25 11:46:40 +02:00
2018-09-19 22:43:48 +02:00
2020-06-03 08:18:11 +02:00
2021-04-07 12:47:03 +02:00
2021-06-03 08:36:10 +02:00
2017-11-02 11:10:55 +01:00
2018-12-01 09:42:54 +01:00
2022-06-06 08:20:57 +02:00
2018-09-05 09:26:30 +02:00