Commit e73a67d4 authored by Lipeng Sang's avatar Lipeng Sang
Browse files

mm: memcontrol: fix cannot alloc the maximum memcg ID

stable inclusion
from stable-v5.19.17
commit be740503
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6HGFP
CVE: NA

Reference: https://github.com/torvalds/linux/commit/be740503ed03ea04ca362330baf082e6a38fe462

--------------------------------

commit be740503 upstream.

The idr_alloc() does not include @max ID.  So in the current
implementation, the maximum memcg ID is 65534 instead of 65535.  It
seems a bug.  So fix this.

Link: https://lkml.kernel.org/r/20220228122126.37293-15-songmuchun@bytedance.com


Signed-off-by: default avatarMuchun Song <songmuchun@bytedance.com>
Cc: Alex Shi <alexs@kernel.org>
Cc: Anna Schumaker <Anna.Schumaker@Netapp.com>
Cc: Chao Yu <chao@kernel.org>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Fam Zheng <fam.zheng@bytedance.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Kari Argillander <kari.argillander@gmail.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Shakeel Butt <shakeelb@google.com>
Signed-off-by: default avatarLipeng Sang <sanglipeng1@jd.com>
parent 03d1f7f5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment