From patchwork Wed Aug 10 15:18:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yafang Shao X-Patchwork-Id: 12940662 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F40BEC19F2A for ; Wed, 10 Aug 2022 15:18:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8CCD86B0072; Wed, 10 Aug 2022 11:18:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 854F88E0001; Wed, 10 Aug 2022 11:18:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6A7F66B0074; Wed, 10 Aug 2022 11:18:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 583A76B0072 for ; Wed, 10 Aug 2022 11:18:47 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 2CB8A40E8F for ; Wed, 10 Aug 2022 15:18:47 +0000 (UTC) X-FDA: 79784040294.15.02CF659 Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by imf13.hostedemail.com (Postfix) with ESMTP id A928320192 for ; Wed, 10 Aug 2022 15:18:46 +0000 (UTC) Received: by mail-pf1-f176.google.com with SMTP id y141so13986575pfb.7 for ; Wed, 10 Aug 2022 08:18:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=iWaAjku+9DHBSIX7N6Ue4B+MVNq84IC+6QjMUqI3TB0=; b=CPgLyVnidMMk4GxlhvJN9csE3zFaEsw0RkDcky9edtzCViXQGvkkolE7C4TauVH1QK 2nwbPpGvXiEawLGVclFMmxHrdzGXGedWIq7VVtZ5LJZV4uDTybEQXg2lZo1vIrf119fs 5a+PGRzH49LiiCC6cxeXW2R8+oPDi4Yqx67nioX52IQnf6F7a7PqSh3xeeN3GOKYuAGv UoZusZOzrP/kcTKXc+27w4CadHPevkiaH6PG5MPg4w589WghL5lDmrgT3NjzroR+Eo8x gORQJLAFVP5SqSrnPdA7oiaRP1IG1vN1c0YUxc1BT1Ff8ORvSMv7a3Vlh0p57unUFgrA YLPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=iWaAjku+9DHBSIX7N6Ue4B+MVNq84IC+6QjMUqI3TB0=; b=HTCMlOLBcmKGKxdyQ4kGPoQd0B/OSJjrEegIqzxYq/sn6PzLHV/5vuUSrOklKTrn16 IPzKUoHO2We1ONpjlonTCWagjrB6mMBoqaJYPlxD5CshU0RgWI/fOWw+A4Sw4RLCS5TD mWSH9cr84egG+6hp+v8AVjsdmk1sPznrTQ1+dApMuoaKm5vuAqk7mCfyHNAJ3fPAV8Td 9IBNZKDHi7QoPe9gkhZJkeWTOa1fBucxOs99WftYquDc/sqSmV7TlT/EJT9eyBdCwT4+ SiYm170a/sZdoF1O/L1AicbQ3XAe7unAiaFULHIvkdlF5K1yA8EuDR3LLz9Kr0cLOKSc XkiQ== X-Gm-Message-State: ACgBeo2oGAU0YGtcLLXDjaclv918TJXqpu1jUrHgSoMTSzJSCdvBwSDj 4dov/lANBXDgAiNXa7XpWHU= X-Google-Smtp-Source: AA6agR7sx3QNeFXPD4mnbqj/uQJmqwZMeBLMKJlcJXBo6ebE+MWM5vHtGHaBxs5FWyjJha+MVy6bOg== X-Received: by 2002:a63:494a:0:b0:41c:f29e:2a2e with SMTP id y10-20020a63494a000000b0041cf29e2a2emr22391660pgk.477.1660144725756; Wed, 10 Aug 2022 08:18:45 -0700 (PDT) Received: from vultr.guest ([2001:19f0:6001:5c3e:5400:4ff:fe19:c3bc]) by smtp.gmail.com with ESMTPSA id 85-20020a621558000000b0052b6ed5ca40sm2071935pfv.192.2022.08.10.08.18.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Aug 2022 08:18:44 -0700 (PDT) From: Yafang Shao To: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com, haoluo@google.com, jolsa@kernel.org, hannes@cmpxchg.org, mhocko@kernel.org, roman.gushchin@linux.dev, shakeelb@google.com, songmuchun@bytedance.com, akpm@linux-foundation.org Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, linux-mm@kvack.org, Yafang Shao Subject: [PATCH bpf-next 01/15] bpf: Remove unneeded memset in queue_stack_map creation Date: Wed, 10 Aug 2022 15:18:26 +0000 Message-Id: <20220810151840.16394-2-laoar.shao@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220810151840.16394-1-laoar.shao@gmail.com> References: <20220810151840.16394-1-laoar.shao@gmail.com> MIME-Version: 1.0 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1660144726; a=rsa-sha256; cv=none; b=A6i2Z/mhgpz7hLSqXNv5B6PN9HZqW7zvY0MnocQM6NFiGuruhypTdCbaTpgZAfV64Eeyl1 1xvxEqPeK0/UXbKHVHyHXsMnu73Xxz7N/fSqTtZCvpiTTnosQ2n1sIBUv9P7bdl8Y4Ig/8 lCJC8DSy+LIS38CKjViefo978vM/Ph0= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=CPgLyVni; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf13.hostedemail.com: domain of laoar.shao@gmail.com designates 209.85.210.176 as permitted sender) smtp.mailfrom=laoar.shao@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1660144726; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=iWaAjku+9DHBSIX7N6Ue4B+MVNq84IC+6QjMUqI3TB0=; b=iY/0KoJO4R8K3KT6SLHk8iCi5dMhApsg+DBTiq7mWTMOaKgvQcRiYfg1KCbyr0TkWZWRj3 ERZFUc29HSWqmsNVtYQlRXWXEWfUrXBvqx6xQssjphsHowrl5BvRwkrW6vbqF5/t6Nue4X WrpoQXujM7FYDweqPXDc4vCVQi8eO6o= X-Rspamd-Server: rspam12 X-Rspam-User: X-Rspamd-Queue-Id: A928320192 Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=CPgLyVni; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf13.hostedemail.com: domain of laoar.shao@gmail.com designates 209.85.210.176 as permitted sender) smtp.mailfrom=laoar.shao@gmail.com X-Stat-Signature: mwqqpj8cqryjx8qz8wbemf3r5a7jbzph X-HE-Tag: 1660144726-417280 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: __GFP_ZERO will clear the memory, so we don't need to memset it. Signed-off-by: Yafang Shao --- kernel/bpf/queue_stack_maps.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/bpf/queue_stack_maps.c b/kernel/bpf/queue_stack_maps.c index a1c0794..8a5e060 100644 --- a/kernel/bpf/queue_stack_maps.c +++ b/kernel/bpf/queue_stack_maps.c @@ -78,8 +78,6 @@ static struct bpf_map *queue_stack_map_alloc(union bpf_attr *attr) if (!qs) return ERR_PTR(-ENOMEM); - memset(qs, 0, sizeof(*qs)); - bpf_map_init_from_attr(&qs->map, attr); qs->size = size;