Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lineage 18 updates #41

Merged
merged 131 commits into from
Feb 19, 2023
Merged
Changes from 1 commit
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
4cc4923
Enable Werror
Jan 15, 2023
7d89563
cgroup: record ancestor IDs and reimplement cgroup_is_descendant() us…
htejun Nov 20, 2015
7a8bacd
kernfs: implement kernfs_walk_and_get()
htejun Nov 20, 2015
3e743aa
cgroup: implement cgroup_get_from_path() and expose cgroup_put()
htejun Nov 20, 2015
f98f898
cgroup: kill cgrp_ss_priv[CGROUP_CANFORK_COUNT] and friends
oleg-nesterov Dec 3, 2015
12742dc
kernel: Nuke void *priv from cpuset_fork
Maitreya29 Aug 30, 2021
6a3c897
netprio_cgroup: limit the maximum css->id to USHRT_MAX
htejun Dec 7, 2015
7015f4a
net: wrap sock->sk_cgrp_prioidx and ->sk_classid inside a struct
htejun Dec 7, 2015
411b667
Revert "net/compat: Add missing sock updates for SCM_RIGHTS"
Maitreya29 Aug 29, 2021
d0280d6
net/compat: Add missing sock updates for SCM_RIGHTS
kees Jun 9, 2020
8dc115c
sock, cgroup: add sock->sk_cgroup
htejun Dec 7, 2015
41e72dc
cgroup: fix sock_cgroup_data initialization on earlier compilers
htejun Dec 9, 2015
886fca4
net, cgroup: cgroup_sk_updat_lock was missing initializer
htejun Dec 14, 2015
ad19c08
cgroup: demote subsystem init messages to KERN_DEBUG
htejun Dec 29, 2015
06469a9
locks: sprinkle some tracepoints around the file locking code
Jan 7, 2016
a915a19
locks: rename __posix_lock_file to posix_lock_inode
Jan 7, 2016
cc1495c
cgroup: fix a typo.
Jan 9, 2016
0747bf3
sock: struct proto hash function may error
kraigatgoog Feb 10, 2016
6048baf
cgroup: provide cgroup_nov1= to disable controllers in v1 mounts
hnaz Feb 11, 2016
2ac87e5
kernfs: Add API to generate relative kernfs path
adityakali Jan 29, 2016
46d7028
sched: new clone flag CLONE_NEWCGROUP for cgroup namespace
adityakali Jan 29, 2016
5f4f2fe
cgroup: introduce cgroup namespaces
adityakali Jan 29, 2016
41f3d36
cgroup: cgroup namespace setns support
adityakali Jan 29, 2016
b922ada
kernfs: define kernfs_node_dentry
adityakali Jan 29, 2016
1209dc1
cgroup: mount cgroupns-root when inside non-init cgroupns
hallyn Jan 29, 2016
8d6f8f7
Add FS_USERNS_FLAG to cgroup fs
hallyn Jan 29, 2016
b508b06
cgroup: fix alloc_cgroup_ns() error handling in copy_cgroup_ns()
htejun Feb 18, 2016
9762408
perf: generalize perf_callchain
4ast Feb 18, 2016
71e8f3b
cgroup: fix error return value of cgroup_addrm_files()
htejun Feb 23, 2016
f780ceb
Revert "cgroup: add cgroup_subsys->css_e_css_changed()"
htejun Feb 23, 2016
8a4b542
cgroup: s/child_subsys_mask/subtree_ss_mask/
htejun Feb 23, 2016
86a0801
cgroup: convert for_each_subsys_which() to do-while style
htejun Feb 23, 2016
00d4bad
cgroup: use do_each_subsys_mask() where applicable
htejun Feb 23, 2016
9a3b586
cgroup: make cgroup subsystem masks u16
htejun Feb 23, 2016
ebf9f20
cgroup: s/cgrp_dfl_root_/cgrp_dfl_/
htejun Feb 23, 2016
ae94acb
cgroup: make css_tryget_online_from_dir() also recognize cgroup2 fs
htejun Feb 23, 2016
8027e75
cgroup: use ->subtree_control when testing no internal process rule
htejun Feb 23, 2016
2fdd60d
cgroup: fix a mistake in warning message
Feb 26, 2016
39382a2
objtool: Add STACK_FRAME_NON_STANDARD() macro
jpoimboe Feb 29, 2016
98b71dd
cgroup: fix and restructure error handling in copy_cgroup_ns()
htejun Feb 28, 2016
1132e55
cgroup: reset css on destruction
Mar 1, 2016
89b466a
cgroup: re-hash init_css_set after subsystems are initialized
htejun Mar 3, 2016
0425df8
cgroup: suppress spurious de-populated events
htejun Mar 3, 2016
897f862
cgroup: separate out interface file creation from css creation
htejun Mar 3, 2016
162856c
cgroup: explicitly track whether a cgroup_subsys_state is visible to …
htejun Mar 3, 2016
88d9a29
cgroup: reorder operations in cgroup_mkdir()
htejun Mar 3, 2016
f114212
cgroup: factor out cgroup_create() out of cgroup_mkdir()
htejun Mar 3, 2016
c574611
cgroup: introduce cgroup_control() and cgroup_ss_mask()
htejun Mar 3, 2016
d2563d5
cgroup: factor out cgroup_drain_offline() from cgroup_subtree_control…
htejun Mar 3, 2016
0bc8460
cgroup: factor out cgroup_apply_control_disable() from cgroup_subtree…
htejun Mar 3, 2016
e39cb18
cgroup: factor out cgroup_apply_control_enable() from cgroup_subtree_…
htejun Mar 3, 2016
ba7c81c
cgroup: make cgroup_drain_offline() and cgroup_apply_control_{disable…
htejun Mar 3, 2016
f84dc9f
cgroup: introduce cgroup_{save|propagate|restore}_control()
htejun Mar 3, 2016
2704b25
cgroup: factor out cgroup_{apply|finalize}_control() from cgroup_subt…
htejun Mar 3, 2016
3b0466f
cgroup: combine cgroup_mutex locking and offline css draining
htejun Mar 3, 2016
c7bf842
cgroup: use cgroup_apply_enable_control() in cgroup creation path
htejun Mar 3, 2016
dac9806
cgroup: reimplement rebind_subsystems() using cgroup_apply_control() …
htejun Mar 3, 2016
cedb9cc
cgroup: make cgroup_calc_subtree_ss_mask() take @this_ss_mask
htejun Mar 3, 2016
b8ba2e1
cgroup: allocate 2x cgrp_cset_links when setting up a new root
htejun Mar 3, 2016
c3e4b52
cgroup: update css iteration in cgroup_update_dfl_csses()
htejun Mar 3, 2016
ea300d0
cgroup: fix incorrect destination cgroup in cgroup_update_dfl_csses()
htejun Mar 8, 2016
466f018
cgroup: move migration destination verification out of cgroup_migrate…
htejun Mar 8, 2016
1edb7b7
cgroup: make cgroup[_taskset]_migrate() take cgroup_root instead of c…
htejun Mar 8, 2016
d6b8ac5
cgroup: use css_set->mg_dst_cgrp for the migration target cgroup
htejun Mar 8, 2016
c1b4024
cgroup: implement cgroup_subsys->implicit_on_dfl
htejun Mar 8, 2016
c24c9b0
ip_tunnel: add support for setting flow label via collect metadata
borkmann Mar 9, 2016
3fd5707
wireguard: compat: udp_tunnel: Account for kernel 4.4 BPF backport
bgcngm Mar 7, 2022
b92dd03
perf/core: Set event's default ::overflow_handler()
WangNan0 Mar 28, 2016
ffce5f0
perf: remove unused __addr variable
4ast Apr 7, 2016
9383426
perf: split perf_trace_buf_prepare into alloc and update parts
4ast Apr 7, 2016
abb25ea
kernfs_path_from_node_locked: don't overwrite nlen
hallyn Apr 17, 2016
856b081
cgroup, kernfs: make mountinfo show properly scoped path for cgroup n…
hallyn May 9, 2016
badc88f
cgroup: fix compile warning
May 12, 2016
df15b8c
kernfs: kernfs_sop_show_path: don't return 0 after seq_dentry call
hallyn May 12, 2016
116bd86
cgroup: remove redundant cleanup in css_create
Wenwei0320 May 13, 2016
180a9ed
sk_buff: allow segmenting based on frag sizes
marceloleitner Jun 2, 2016
e5d2a5b
cgroup: fix idr leak for the first cgroup root
hnaz Jun 17, 2016
af36f15
cgroup: remove unnecessary 0 check from css_from_id()
hnaz Jun 17, 2016
d46c959
cgroup: allow NULL return from ss->css_alloc()
htejun Jun 21, 2016
15cc110
vfs: Pass data, ns, and ns->userns to mount_ns
ebiederm May 23, 2016
8d007fa
fs: Add user namespace member to struct super_block
ebiederm May 24, 2016
a04c9cd
mnt: Move the FS_USERNS_MOUNT check into sget_userns
ebiederm Jun 6, 2016
b3f8c02
cgroup: Disable IRQs while holding css_set_lock
Jun 22, 2016
ed55710
fs: Limit file caps to the user namespace of the super block
Sep 23, 2015
61fd5fd
cgroup: Add cgroup_get_from_fd
iamkafai Jun 30, 2016
95a4712
net: simplify and make pkt_type_ok() available for other users
jhsmt Jul 2, 2016
2b04d44
cgroupns: Fix the locking in copy_cgroup_ns
ebiederm Jul 15, 2016
1ece85e
cgroupns: Only allow creation of hierarchies in the initial cgroup na…
ebiederm Jul 15, 2016
948f937
perf, events: add non-linear data support for raw records
borkmann Jul 14, 2016
0a7815b
fs: Call d_automount with the filesystems creds
ebiederm Jul 23, 2016
2d45254
kernfs: make kernfs_path*() behave in the style of strlcpy()
htejun Aug 10, 2016
8f43506
cgroup: make cgroup_path() and friends behave in the style of strlcpy()
htejun Aug 10, 2016
f4f4f3b
cgroup: add tracepoints for basic operations
htejun Aug 10, 2016
65b7eed
cgroup: Add task_under_cgroup_hierarchy cgroup inline function to hea…
sargun Aug 12, 2016
1fb743e
cgroup: duplicate cgroup reference when cloning sockets
Sep 19, 2016
7a6f720
kernel: add a helper to get an owning user namespace for a namespace
avagin Sep 6, 2016
dcbeaab
cgroup: fix invalid controller enable rejections with cgroup namespace
htejun Sep 23, 2016
fca5111
cgroup: fix error handling regressions in proc_cgroup_show() and cgro…
htejun Sep 29, 2016
d1f3a60
autofs: Fix automounts by using current_real_cred()->uid
ebiederm Sep 30, 2016
3eb69b4
UPSTREAM: kernfs: add kernfs_ops->open/release() callbacks
htejun Dec 27, 2016
d9d9187
UPSTREAM: cgroup add cftype->open/release() callbacks
htejun Dec 27, 2016
2a1691e
UPSTREAM: cgroup: move CONFIG_SOCK_CGROUP_DATA to init/Kconfig
arndb Jan 10, 2017
1124b0e
cgroup: don't online subsystems before cgroup_name/path() are operati…
htejun Jan 26, 2017
4cfd522
fs: Better permission checking for submounts
ebiederm Jan 31, 2017
b01d6d1
UPSTREAM: kernfs: fix locking around kernfs_ops->release() callback
htejun Feb 11, 2017
5422850
objtool, modules: Discard objtool annotation sections for modules
jpoimboe Mar 1, 2017
8070aed
UPSTREAM: kernfs: Check KERNFS_HAS_RELEASE before calling kernfs_rele…
vaibhav92 Mar 14, 2017
cb8f5b8
FROMLIST: ipv6: Initial skb->dev and skb->protocol in ip6_output
Jun 9, 2017
5a735f7
FROMLIST: Remove the redundant skb->dev initialization in ip6_fragment
Jun 10, 2017
637c9eb
BACKPORT: cgroup: misc changes
htejun Aug 11, 2017
2288263
userns: Don't fail follow_automount based on s_user_ns
ebiederm Nov 29, 2017
0504868
selinux: always allow mounting submounts
WOnder93 Nov 16, 2018
5839b98
UPSTREAM: mm: reuse only-pte-mapped KSM page in do_wp_page()
Mar 5, 2019
bfc7401
BACKPORT: fs: kernfs: add poll file operation
hnaz Jan 30, 2019
643be2b
FROMLIST: kernel: cgroup: add poll file operation
hnaz Dec 6, 2018
33cdefd
Revert "cgroup: Disable IRQs while holding css_set_lock"
anayw2001 May 23, 2021
661fc64
cgroup: refactor allow_attach function into common code
roml Nov 7, 2014
24f7733
cgroup: Add generic cgroup subsystem permission checks
colincross Jul 13, 2011
22b2b4d
net: gso: Fix skb_segment splat when splitting gso_size mangled skb h…
Sep 6, 2019
5c7512d
cgroup: memcg: net: do not associate sock with unrelated cgroup
shakeelb Mar 10, 2020
7b158e2
netprio_cgroup: Fix unlimited memory leak of v2 cgroups
lizf-os May 9, 2020
0227ece
cgroup: fix cgroup_sk_alloc() for sk_clone_lock()
congwang Jul 2, 2020
159cad8
cgroup: Fix sock_cgroup_data on big-endian.
congwang Jul 9, 2020
cd3fb08
cgroup: add missing skcd->no_refcnt check in cgroup_sk_clone()
Aug 13, 2020
feadb97
ANDROID: staging: ion: move buffer kmap from begin/end_cpu_access()
Jul 26, 2021
58ff4ad
cgroup: Make rebind_subsystems() disable v2 controllers all at once
Waiman-Long Sep 18, 2021
7df142a
BACKPORT: mm: do_wp_page() simplification
torvalds Aug 21, 2020
8a03668
UPSTREAM: mm/ksm: Remove reuse_ksm_page()
xzpeter Aug 21, 2020
dc0b7dc
UPSTREAM: mm: fix misplaced unlock_page in do_wp_page()
torvalds Sep 24, 2020
285ded7
Revert "dts: yoshino: Mount oem partition to /ocm"
derfelot Apr 15, 2022
6ad8c27
dts: yoshino: maple: Mount vendor on oem partition
derfelot Apr 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
locks: sprinkle some tracepoints around the file locking code
Add some tracepoints around the POSIX locking code. These were useful
when tracking down problems when handling the race between setlk and
close.

Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Acked-by: "J. Bruce Fields" <bfields@fieldses.org>
Change-Id: I270eda634890d21399ccf939ad6d03b7d201a148
Jeff Layton authored and Flamefire committed Feb 1, 2023
commit 06469a94d86f8a3156e997ac8656a028ce8272ef
12 changes: 9 additions & 3 deletions fs/locks.c
Original file line number Diff line number Diff line change
@@ -230,6 +230,7 @@ locks_get_lock_context(struct inode *inode, int type)
ctx = smp_load_acquire(&inode->i_flctx);
}
out:
trace_locks_get_lock_context(inode, type, ctx);
return ctx;
}

@@ -1142,6 +1143,8 @@ static int __posix_lock_file(struct inode *inode, struct file_lock *request, str
if (new_fl2)
locks_free_lock(new_fl2);
locks_dispose_list(&dispose);
trace_posix_lock_inode(inode, request, error);

return error;
}

@@ -2165,15 +2168,15 @@ int fcntl_setlk(unsigned int fd, struct file *filp, unsigned int cmd,
if (file_lock == NULL)
return -ENOLCK;

inode = file_inode(filp);

/*
* This might block, so we do it before checking the inode.
*/
error = -EFAULT;
if (copy_from_user(&flock, l, sizeof(flock)))
goto out;

inode = file_inode(filp);

/* Don't allow mandatory locks on files that may be memory mapped
* and shared.
*/
@@ -2242,6 +2245,7 @@ int fcntl_setlk(unsigned int fd, struct file *filp, unsigned int cmd,
}
}
out:
trace_fcntl_setlk(inode, file_lock, error);
locks_free_lock(file_lock);
return error;
}
@@ -2398,6 +2402,7 @@ int fcntl_setlk64(unsigned int fd, struct file *filp, unsigned int cmd,
*/
void locks_remove_posix(struct file *filp, fl_owner_t owner)
{
int error;
struct file_lock lock;
struct file_lock_context *ctx;

@@ -2420,10 +2425,11 @@ void locks_remove_posix(struct file *filp, fl_owner_t owner)
lock.fl_ops = NULL;
lock.fl_lmops = NULL;

vfs_lock_file(filp, F_SETLK, &lock, NULL);
error = vfs_lock_file(filp, F_SETLK, &lock, NULL);

if (lock.fl_ops && lock.fl_ops->fl_release_private)
lock.fl_ops->fl_release_private(&lock);
trace_locks_remove_posix(file_inode(filp), &lock, error);
}

EXPORT_SYMBOL(locks_remove_posix);
77 changes: 77 additions & 0 deletions include/trace/events/filelock.h
Original file line number Diff line number Diff line change
@@ -34,6 +34,83 @@
{ F_WRLCK, "F_WRLCK" }, \
{ F_UNLCK, "F_UNLCK" })

TRACE_EVENT(locks_get_lock_context,
TP_PROTO(struct inode *inode, int type, struct file_lock_context *ctx),

TP_ARGS(inode, type, ctx),

TP_STRUCT__entry(
__field(unsigned long, i_ino)
__field(dev_t, s_dev)
__field(unsigned char, type)
__field(struct file_lock_context *, ctx)
),

TP_fast_assign(
__entry->s_dev = inode->i_sb->s_dev;
__entry->i_ino = inode->i_ino;
__entry->type = type;
__entry->ctx = ctx;
),

TP_printk("dev=0x%x:0x%x ino=0x%lx type=%s ctx=%p",
MAJOR(__entry->s_dev), MINOR(__entry->s_dev),
__entry->i_ino, show_fl_type(__entry->type), __entry->ctx)
);

DECLARE_EVENT_CLASS(filelock_lock,
TP_PROTO(struct inode *inode, struct file_lock *fl, int ret),

TP_ARGS(inode, fl, ret),

TP_STRUCT__entry(
__field(struct file_lock *, fl)
__field(unsigned long, i_ino)
__field(dev_t, s_dev)
__field(struct file_lock *, fl_next)
__field(fl_owner_t, fl_owner)
__field(unsigned int, fl_pid)
__field(unsigned int, fl_flags)
__field(unsigned char, fl_type)
__field(loff_t, fl_start)
__field(loff_t, fl_end)
__field(int, ret)
),

TP_fast_assign(
__entry->fl = fl ? fl : NULL;
__entry->s_dev = inode->i_sb->s_dev;
__entry->i_ino = inode->i_ino;
__entry->fl_next = fl ? fl->fl_next : NULL;
__entry->fl_owner = fl ? fl->fl_owner : NULL;
__entry->fl_pid = fl ? fl->fl_pid : 0;
__entry->fl_flags = fl ? fl->fl_flags : 0;
__entry->fl_type = fl ? fl->fl_type : 0;
__entry->fl_start = fl ? fl->fl_start : 0;
__entry->fl_end = fl ? fl->fl_end : 0;
__entry->ret = ret;
),

TP_printk("fl=0x%p dev=0x%x:0x%x ino=0x%lx fl_next=0x%p fl_owner=0x%p fl_pid=%u fl_flags=%s fl_type=%s fl_start=%lld fl_end=%lld ret=%d",
__entry->fl, MAJOR(__entry->s_dev), MINOR(__entry->s_dev),
__entry->i_ino, __entry->fl_next, __entry->fl_owner,
__entry->fl_pid, show_fl_flags(__entry->fl_flags),
show_fl_type(__entry->fl_type),
__entry->fl_start, __entry->fl_end, __entry->ret)
);

DEFINE_EVENT(filelock_lock, posix_lock_inode,
TP_PROTO(struct inode *inode, struct file_lock *fl, int ret),
TP_ARGS(inode, fl, ret));

DEFINE_EVENT(filelock_lock, fcntl_setlk,
TP_PROTO(struct inode *inode, struct file_lock *fl, int ret),
TP_ARGS(inode, fl, ret));

DEFINE_EVENT(filelock_lock, locks_remove_posix,
TP_PROTO(struct inode *inode, struct file_lock *fl, int ret),
TP_ARGS(inode, fl, ret));

DECLARE_EVENT_CLASS(filelock_lease,

TP_PROTO(struct inode *inode, struct file_lock *fl),