@@ -5630,18 +5630,20 @@ static int event_hist_open(struct inode *inode, struct file *file)
5630
5630
{
5631
5631
int ret ;
5632
5632
5633
- ret = security_locked_down ( LOCKDOWN_TRACEFS );
5633
+ ret = tracing_open_file_tr ( inode , file );
5634
5634
if (ret )
5635
5635
return ret ;
5636
5636
5637
+ /* Clear private_data to avoid warning in single_open() */
5638
+ file -> private_data = NULL ;
5637
5639
return single_open (file , hist_show , file );
5638
5640
}
5639
5641
5640
5642
const struct file_operations event_hist_fops = {
5641
5643
.open = event_hist_open ,
5642
5644
.read = seq_read ,
5643
5645
.llseek = seq_lseek ,
5644
- .release = single_release ,
5646
+ .release = tracing_single_release_file_tr ,
5645
5647
};
5646
5648
5647
5649
#ifdef CONFIG_HIST_TRIGGERS_DEBUG
@@ -5907,18 +5909,20 @@ static int event_hist_debug_open(struct inode *inode, struct file *file)
5907
5909
{
5908
5910
int ret ;
5909
5911
5910
- ret = security_locked_down ( LOCKDOWN_TRACEFS );
5912
+ ret = tracing_open_file_tr ( inode , file );
5911
5913
if (ret )
5912
5914
return ret ;
5913
5915
5916
+ /* Clear private_data to avoid warning in single_open() */
5917
+ file -> private_data = NULL ;
5914
5918
return single_open (file , hist_debug_show , file );
5915
5919
}
5916
5920
5917
5921
const struct file_operations event_hist_debug_fops = {
5918
5922
.open = event_hist_debug_open ,
5919
5923
.read = seq_read ,
5920
5924
.llseek = seq_lseek ,
5921
- .release = single_release ,
5925
+ .release = tracing_single_release_file_tr ,
5922
5926
};
5923
5927
#endif
5924
5928
0 commit comments