Message ID | 5d523cf8-1540-e704-2301-a5e0205cb536@users.sourceforge.net |
---|---|
State | Rejected, archived |
Delegated to: | David Miller |
Headers | show |
On (05/22/17 16:13), SF Markus Elfring wrote: > > Omit an extra message for a memory allocation failure in this function. The change itself is harmless, but I'm curious about the "extra" part: "extra" from what? If this happens, hopefully this will be logged somewhere? Note that this type of (infrequent) logging noise is useful in some cases, e.g., with 8ce675ff, when one is trying to do the post-mortem of where things first went wrong. --Sowmini
>> Omit an extra message for a memory allocation failure in this function. > > The change itself is harmless, but I'm curious about the "extra" > part: "extra" from what? If this happens, hopefully this will be logged > somewhere? Note that this type of (infrequent) logging noise is useful > in some cases, e.g., with 8ce675ff, when one is trying to do the > post-mortem of where things first went wrong. Do you find information from a Linux allocation failure report sufficient for such an use case? Regards, Markus
> Do you find information from a Linux allocation failure report sufficient > for such an use case? yes, I suppose that would cover the needed cases. Your change looks good to me. Acked-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
diff --git a/net/rds/tcp.c b/net/rds/tcp.c index 431404dbdad1..b0348697dee5 100644 --- a/net/rds/tcp.c +++ b/net/rds/tcp.c @@ -431,10 +431,9 @@ static __net_init int rds_tcp_init_net(struct net *net) } else { tbl = kmemdup(rds_tcp_sysctl_table, sizeof(rds_tcp_sysctl_table), GFP_KERNEL); - if (!tbl) { - pr_warn("could not set allocate syctl table\n"); + if (!tbl) return -ENOMEM; - } + rtn->ctl_table = tbl; } tbl[RDS_TCP_SNDBUF].data = &rtn->sndbuf_size;