Skip to content

Commit 30b968b

Browse files
Yu-Ting Tsenggregkh
authored andcommitted
binder: frozen notification binder_features flag
Add a flag to binder_features to indicate that the freeze notification feature is available. Signed-off-by: Yu-Ting Tseng <[email protected]> Acked-by: Carlos Llamas <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent d579b04 commit 30b968b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

drivers/android/binderfs.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ enum binderfs_stats_mode {
5858
struct binder_features {
5959
bool oneway_spam_detection;
6060
bool extended_error;
61+
bool freeze_notification;
6162
};
6263

6364
static const struct constant_table binderfs_param_stats[] = {
@@ -74,6 +75,7 @@ static const struct fs_parameter_spec binderfs_fs_parameters[] = {
7475
static struct binder_features binder_features = {
7576
.oneway_spam_detection = true,
7677
.extended_error = true,
78+
.freeze_notification = true,
7779
};
7880

7981
static inline struct binderfs_info *BINDERFS_SB(const struct super_block *sb)
@@ -608,6 +610,12 @@ static int init_binder_features(struct super_block *sb)
608610
if (IS_ERR(dentry))
609611
return PTR_ERR(dentry);
610612

613+
dentry = binderfs_create_file(dir, "freeze_notification",
614+
&binder_features_fops,
615+
&binder_features.freeze_notification);
616+
if (IS_ERR(dentry))
617+
return PTR_ERR(dentry);
618+
611619
return 0;
612620
}
613621

tools/testing/selftests/filesystems/binderfs/binderfs_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ static int __do_binderfs_test(struct __test_metadata *_metadata)
6565
static const char * const binder_features[] = {
6666
"oneway_spam_detection",
6767
"extended_error",
68+
"freeze_notification",
6869
};
6970

7071
change_mountns(_metadata);

0 commit comments

Comments
 (0)