@@ -424,7 +424,6 @@ static struct trace_fprobe *alloc_trace_fprobe(const char *group,
424
424
const char * symbol ,
425
425
struct tracepoint * tpoint ,
426
426
struct module * mod ,
427
- int maxactive ,
428
427
int nargs , bool is_return )
429
428
{
430
429
struct trace_fprobe * tf ;
@@ -445,7 +444,6 @@ static struct trace_fprobe *alloc_trace_fprobe(const char *group,
445
444
446
445
tf -> tpoint = tpoint ;
447
446
tf -> mod = mod ;
448
- tf -> fp .nr_maxactive = maxactive ;
449
447
450
448
ret = trace_probe_init (& tf -> tp , event , group , false, nargs );
451
449
if (ret < 0 )
@@ -1098,12 +1096,11 @@ static int __trace_fprobe_create(int argc, const char *argv[])
1098
1096
* FETCHARG:TYPE : use TYPE instead of unsigned long.
1099
1097
*/
1100
1098
struct trace_fprobe * tf = NULL ;
1101
- int i , len , new_argc = 0 , ret = 0 ;
1099
+ int i , new_argc = 0 , ret = 0 ;
1102
1100
bool is_return = false;
1103
1101
char * symbol = NULL ;
1104
1102
const char * event = NULL , * group = FPROBE_EVENT_SYSTEM ;
1105
1103
const char * * new_argv = NULL ;
1106
- int maxactive = 0 ;
1107
1104
char buf [MAX_EVENT_NAME_LEN ];
1108
1105
char gbuf [MAX_EVENT_NAME_LEN ];
1109
1106
char sbuf [KSYM_NAME_LEN ];
@@ -1126,33 +1123,13 @@ static int __trace_fprobe_create(int argc, const char *argv[])
1126
1123
1127
1124
trace_probe_log_init ("trace_fprobe" , argc , argv );
1128
1125
1129
- event = strchr (& argv [0 ][1 ], ':' );
1130
- if (event )
1131
- event ++ ;
1132
-
1133
- if (isdigit (argv [0 ][1 ])) {
1134
- if (event )
1135
- len = event - & argv [0 ][1 ] - 1 ;
1136
- else
1137
- len = strlen (& argv [0 ][1 ]);
1138
- if (len > MAX_EVENT_NAME_LEN - 1 ) {
1139
- trace_probe_log_err (1 , BAD_MAXACT );
1140
- goto parse_error ;
1141
- }
1142
- memcpy (buf , & argv [0 ][1 ], len );
1143
- buf [len ] = '\0' ;
1144
- ret = kstrtouint (buf , 0 , & maxactive );
1145
- if (ret || !maxactive ) {
1126
+ if (argv [0 ][1 ] != '\0' ) {
1127
+ if (argv [0 ][1 ] != ':' ) {
1128
+ trace_probe_log_set_index (0 );
1146
1129
trace_probe_log_err (1 , BAD_MAXACT );
1147
1130
goto parse_error ;
1148
1131
}
1149
- /* fprobe rethook instances are iterated over via a list. The
1150
- * maximum should stay reasonable.
1151
- */
1152
- if (maxactive > RETHOOK_MAXACTIVE_MAX ) {
1153
- trace_probe_log_err (1 , MAXACT_TOO_BIG );
1154
- goto parse_error ;
1155
- }
1132
+ event = & argv [0 ][2 ];
1156
1133
}
1157
1134
1158
1135
trace_probe_log_set_index (1 );
@@ -1162,12 +1139,6 @@ static int __trace_fprobe_create(int argc, const char *argv[])
1162
1139
if (ret < 0 )
1163
1140
goto parse_error ;
1164
1141
1165
- if (!is_return && maxactive ) {
1166
- trace_probe_log_set_index (0 );
1167
- trace_probe_log_err (1 , BAD_MAXACT_TYPE );
1168
- goto parse_error ;
1169
- }
1170
-
1171
1142
trace_probe_log_set_index (0 );
1172
1143
if (event ) {
1173
1144
ret = traceprobe_parse_event_name (& event , & group , gbuf ,
@@ -1235,7 +1206,7 @@ static int __trace_fprobe_create(int argc, const char *argv[])
1235
1206
1236
1207
/* setup a probe */
1237
1208
tf = alloc_trace_fprobe (group , event , symbol , tpoint , tp_mod ,
1238
- maxactive , argc , is_return );
1209
+ argc , is_return );
1239
1210
if (IS_ERR (tf )) {
1240
1211
ret = PTR_ERR (tf );
1241
1212
/* This must return -ENOMEM, else there is a bug */
@@ -1315,8 +1286,6 @@ static int trace_fprobe_show(struct seq_file *m, struct dyn_event *ev)
1315
1286
seq_putc (m , 't' );
1316
1287
else
1317
1288
seq_putc (m , 'f' );
1318
- if (trace_fprobe_is_return (tf ) && tf -> fp .nr_maxactive )
1319
- seq_printf (m , "%d" , tf -> fp .nr_maxactive );
1320
1289
seq_printf (m , ":%s/%s" , trace_probe_group_name (& tf -> tp ),
1321
1290
trace_probe_name (& tf -> tp ));
1322
1291
0 commit comments