|
@@ -92,14 +92,13 @@ ip_vs_sip_fill_param(struct ip_vs_conn_param *p, struct sk_buff *skb)
|
|
|
if (get_callid(dptr, dataoff, datalen, &matchoff, &matchlen))
|
|
|
return -EINVAL;
|
|
|
|
|
|
- p->pe_data = kmalloc(matchlen, GFP_ATOMIC);
|
|
|
- if (!p->pe_data)
|
|
|
- return -ENOMEM;
|
|
|
-
|
|
|
/* N.B: pe_data is only set on success,
|
|
|
* this allows fallback to the default persistence logic on failure
|
|
|
*/
|
|
|
- memcpy(p->pe_data, dptr + matchoff, matchlen);
|
|
|
+ p->pe_data = kmemdup(dptr + matchoff, matchlen, GFP_ATOMIC);
|
|
|
+ if (!p->pe_data)
|
|
|
+ return -ENOMEM;
|
|
|
+
|
|
|
p->pe_data_len = matchlen;
|
|
|
|
|
|
return 0;
|