mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-07 13:15:12 +02:00
xt_SYSRQ: do not print error messages on ENOMEM
Memory allocation failures are usually already reported by SLAB and the ENOMEM error code itself.
This commit is contained in:
@@ -332,23 +332,14 @@ static int __init sysrq_crypto_init(void)
|
|||||||
sysrq_digest_size = crypto_hash_digestsize(sysrq_tfm);
|
sysrq_digest_size = crypto_hash_digestsize(sysrq_tfm);
|
||||||
sysrq_digest = kmalloc(sysrq_digest_size, GFP_KERNEL);
|
sysrq_digest = kmalloc(sysrq_digest_size, GFP_KERNEL);
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
if (sysrq_digest == NULL) {
|
if (sysrq_digest == NULL)
|
||||||
printk(KERN_WARNING KBUILD_MODNAME
|
|
||||||
": Cannot allocate digest\n");
|
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
|
||||||
sysrq_hexdigest = kmalloc(2 * sysrq_digest_size + 1, GFP_KERNEL);
|
sysrq_hexdigest = kmalloc(2 * sysrq_digest_size + 1, GFP_KERNEL);
|
||||||
if (sysrq_hexdigest == NULL) {
|
if (sysrq_hexdigest == NULL)
|
||||||
printk(KERN_WARNING KBUILD_MODNAME
|
|
||||||
": Cannot allocate hexdigest\n");
|
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
|
||||||
sysrq_digest_password = kmalloc(sizeof(sysrq_password), GFP_KERNEL);
|
sysrq_digest_password = kmalloc(sizeof(sysrq_password), GFP_KERNEL);
|
||||||
if (sysrq_digest_password == NULL) {
|
if (sysrq_digest_password == NULL)
|
||||||
printk(KERN_WARNING KBUILD_MODNAME
|
|
||||||
": Cannot allocate password digest space\n");
|
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
|
||||||
do_gettimeofday(&now);
|
do_gettimeofday(&now);
|
||||||
sysrq_seqno = now.tv_sec;
|
sysrq_seqno = now.tv_sec;
|
||||||
ret = xt_register_targets(sysrq_tg_reg, ARRAY_SIZE(sysrq_tg_reg));
|
ret = xt_register_targets(sysrq_tg_reg, ARRAY_SIZE(sysrq_tg_reg));
|
||||||
|
@@ -179,11 +179,8 @@ tee_tg4(struct sk_buff **pskb, const struct xt_target_param *par)
|
|||||||
* --gateway.
|
* --gateway.
|
||||||
*/
|
*/
|
||||||
skb = skb_copy(skb, GFP_ATOMIC);
|
skb = skb_copy(skb, GFP_ATOMIC);
|
||||||
if (skb == NULL) {
|
if (skb == NULL)
|
||||||
if (net_ratelimit())
|
|
||||||
pr_debug(KBUILD_MODNAME "copy failed!\n");
|
|
||||||
return XT_CONTINUE;
|
return XT_CONTINUE;
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef WITH_CONNTRACK
|
#ifdef WITH_CONNTRACK
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user