OpenCloudOS-Kernel/kernel/cgroup
yilingjin 918a511742 sli: fix crash when open the sli.monitor file in rw mode
When the {cpuacct/memory/blkio}.sli.monitor file is opened in rw mode, the
inode->i_readcount will not be increased. However, sli_monitor_open
will force change f_mode to FMODE_READ, this will lead to a crash when
trying to decrease the i_readcount in put_file_access. This problem is
caused by d6da19c9ca ("locks: fix TOCTOU race when granting write lease")
moving i_readcount_inc before open.
This commit fixes the bug by deleting the operation that forces the f_mode
to be changed to FMODE_READ in sli_monitor_open.

Signed-off-by: yilingjin <yilingjin@tencent.com>
Reviewed-by: Hui Li <caelli@tencent.com>
2024-10-22 06:14:58 +00:00
..
Makefile sli: backport sli function from tk3 2024-06-05 02:28:29 +00:00
cgroup-internal.h rue: cgroup priority 2024-09-27 11:13:29 +08:00
cgroup-v1.c rue: cgroup priority 2024-09-27 11:13:29 +08:00
cgroup.c Merge linux 6.6.51 2024-09-29 19:06:17 +08:00
cpuset.c Merge linux 6.6.44 2024-08-05 17:22:57 +08:00
debug.c kernel: cgroup: fix misuse of %x 2019-05-06 08:47:48 -07:00
freezer.c cgroup: cleanup comments 2022-03-13 19:19:27 -10:00
legacy_freezer.c Merge remote-tracking branch 'stable/linux-6.6.y' into ocks-2401 2024-03-01 17:21:23 +08:00
mbuf.c net/netlat: fix a deadlock when reset the /proc/net/twatcher/log 2024-09-25 11:45:48 +00:00
misc.c cgroup/misc: Store atomic64_t reads to u64 2023-07-21 08:10:06 -10:00
namespace.c cgroup:namespace: Remove unused cgroup_namespaces_init() 2023-08-14 14:29:47 -10:00
pids.c kabi: add paddings (part 2) 2023-12-12 15:56:46 +08:00
rdma.c rdmacg: fix kernel-doc warnings in rdmacg 2023-06-05 09:45:14 -10:00
rstat.c emm: allow modules to access more mm data 2024-04-03 16:58:54 +08:00
sli.c sli: fix crash when open the sli.monitor file in rw mode 2024-10-22 06:14:58 +00:00