From patchwork Mon Oct 17 12:51:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jozsef Kadlecsik X-Patchwork-Id: 682943 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3syJNM6SLdz9s8x for ; Tue, 18 Oct 2016 00:05:39 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=blackhole.kfki.hu header.i=@blackhole.kfki.hu header.b=gkvie882; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755265AbcJQNBh (ORCPT ); Mon, 17 Oct 2016 09:01:37 -0400 Received: from smtp1.kfki.hu ([148.6.0.26]:55703 "EHLO smtp1.kfki.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755187AbcJQNAX (ORCPT ); Mon, 17 Oct 2016 09:00:23 -0400 Received: from localhost (localhost [127.0.0.1]) by smtp1.kfki.hu (Postfix) with ESMTP id 570703C800F1; Mon, 17 Oct 2016 14:51:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= blackhole.kfki.hu; h=references:in-reply-to:x-mailer:message-id :date:date:from:from:received:received:received; s=20151130; t= 1476708699; x=1478523100; bh=G2htxFA87CuJIpZy5Mhj5YCVgT31ZpCU6Mr Yrzxw6dY=; b=gkvie882OVq9WFJtTTbR07Dk/haWGCwiLJGIYjqH8RWU5r8n/1v xSJUn2KYULNWUth/u1odLv91ilaxkkczSy/TEeww9sPuOktAMXnVvfy2NpUuTio9 jkKBpA/og6W24T8CYnZhM/yrAQtWNhzLyUDiy3eT2C1rtMP+X4Qkbxcg= X-Virus-Scanned: Debian amavisd-new at smtp1.kfki.hu Received: from smtp1.kfki.hu ([127.0.0.1]) by localhost (smtp1.kfki.hu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id F7A9EgDRs2Lc; Mon, 17 Oct 2016 14:51:39 +0200 (CEST) Received: from blackhole.kfki.hu (blackhole.kfki.hu [148.6.0.114]) by smtp1.kfki.hu (Postfix) with ESMTP id BB84D3C800E4; Mon, 17 Oct 2016 14:51:39 +0200 (CEST) Received: by blackhole.kfki.hu (Postfix, from userid 1000) id A4B20229F8; Mon, 17 Oct 2016 14:51:39 +0200 (CEST) From: Jozsef Kadlecsik To: netfilter-devel@vger.kernel.org Cc: Pablo Neira Ayuso Subject: [PATCH 04/22] netfilter: ipset: Improve comment extension helpers Date: Mon, 17 Oct 2016 14:51:21 +0200 Message-Id: <1476708699-32761-5-git-send-email-kadlec@blackhole.kfki.hu> X-Mailer: git-send-email 1.8.5.1 In-Reply-To: <1476708699-32761-1-git-send-email-kadlec@blackhole.kfki.hu> References: <1476708699-32761-1-git-send-email-kadlec@blackhole.kfki.hu> Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Allocate memory with kmalloc() rather than kzalloc(). Ported from a patch proposed by Sergey Popovich . Suggested-by: Sergey Popovich Signed-off-by: Jozsef Kadlecsik --- include/linux/netfilter/ipset/ip_set_comment.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/netfilter/ipset/ip_set_comment.h b/include/linux/netfilter/ipset/ip_set_comment.h index bae5c76..5444b1b 100644 --- a/include/linux/netfilter/ipset/ip_set_comment.h +++ b/include/linux/netfilter/ipset/ip_set_comment.h @@ -34,7 +34,7 @@ return; if (unlikely(len > IPSET_MAX_COMMENT_SIZE)) len = IPSET_MAX_COMMENT_SIZE; - c = kzalloc(sizeof(*c) + len + 1, GFP_ATOMIC); + c = kmalloc(sizeof(*c) + len + 1, GFP_ATOMIC); if (unlikely(!c)) return; strlcpy(c->str, ext->comment, len + 1);