Skip to content

Commit

Permalink
Merge 03140e4 on remote branch
Browse files Browse the repository at this point in the history
Change-Id: Ic617718e12802342642b7b5ae2fc0a5a6e11193b
  • Loading branch information
Linux Build Service Account committed Apr 24, 2021
2 parents b1723fe + 03140e4 commit ea6d353
Show file tree
Hide file tree
Showing 11 changed files with 178 additions and 177 deletions.
4 changes: 3 additions & 1 deletion Documentation/networking/ip-sysctl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -920,12 +920,14 @@ icmp_ratelimit - INTEGER
icmp_msgs_per_sec - INTEGER
Limit maximal number of ICMP packets sent per second from this host.
Only messages whose type matches icmp_ratemask (see below) are
controlled by this limit.
controlled by this limit. For security reasons, the precise count
of messages per second is randomized.
Default: 1000

icmp_msgs_burst - INTEGER
icmp_msgs_per_sec controls number of ICMP packets sent per second,
while icmp_msgs_burst controls the burst size of these packets.
For security reasons, the precise burst size is randomized.
Default: 50

icmp_ratemask - INTEGER
Expand Down
12 changes: 8 additions & 4 deletions drivers/char/adsprpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3393,11 +3393,15 @@ static int fastrpc_set_process_info(struct fastrpc_file *fl)
{
int err = 0, buf_size = 0;
char strpid[PID_SIZE];
char cur_comm[TASK_COMM_LEN];

memcpy(cur_comm, current->comm, TASK_COMM_LEN);
cur_comm[TASK_COMM_LEN-1] = '\0';

fl->tgid = current->tgid;
snprintf(strpid, PID_SIZE, "%d", current->pid);
if (debugfs_root) {
buf_size = strlen(current->comm) + strlen("_")
buf_size = strlen(cur_comm) + strlen("_")
+ strlen(strpid) + 1;
spin_lock(&fl->hlock);
if (fl->debug_buf_alloced_attempted) {
Expand All @@ -3411,13 +3415,13 @@ static int fastrpc_set_process_info(struct fastrpc_file *fl)
err = -ENOMEM;
return err;
}
snprintf(fl->debug_buf, UL_SIZE, "%.10s%s%d",
current->comm, "_", current->pid);
snprintf(fl->debug_buf, buf_size, "%.10s%s%d",
cur_comm, "_", current->pid);
fl->debugfs_file = debugfs_create_file(fl->debug_buf, 0644,
debugfs_root, fl, &debugfs_fops);
if (IS_ERR_OR_NULL(fl->debugfs_file)) {
pr_warn("Error: %s: %s: failed to create debugfs file %s\n",
current->comm, __func__, fl->debug_buf);
cur_comm, __func__, fl->debug_buf);
fl->debugfs_file = NULL;
kfree(fl->debug_buf);
fl->debug_buf = NULL;
Expand Down
Loading

0 comments on commit ea6d353

Please sign in to comment.