Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3930380pxu; Wed, 9 Dec 2020 04:24:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJzp4WlGHoHzd+Gshm0bRnZl2MosSH5gPySZoWrJ8LQy0nrCWqDRzjmosLnPGGh2MCeTVgys X-Received: by 2002:a50:c209:: with SMTP id n9mr1739509edf.123.1607516663401; Wed, 09 Dec 2020 04:24:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607516663; cv=none; d=google.com; s=arc-20160816; b=IuzL9guQEacEQ2W8xYA1W82UQ4knAksZGvvfNGCZM6QaN8+yQoFFiLZnsjMkqglkV+ AS85dzQ/9hqupd8jqxh83Ayq7kyZyL7Fr5IYr7wPP7IpCfrslpN0wE/97yedd/2BylWN X/1PsMG3BD00QXS7MD5CpDpHInBeGvUS5EcMt+sJ28OJNThUZ0od50gTyBiW4noxj8sL 2UmpB11I6SOUEwen2S0LxzhCWU7B1d1E1CtC9dyEthrQPh69U3WcHSz5j0Fpictzcjjt 0Igw/eucxrHOupoEz/pCNW3u9NMWfGYDcg8EDjyOEE2/8beIP4JppJMapn0F7ctKvozs AZkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:organization:dkim-signature; bh=zGZTiwKPbzuNxYRc0EhfYab3vSDv6XVztRD7Rd/Qdu8=; b=taYAdWVe9nOjq+8B96QuZVoVUnaXT0J25uVGLBNGqXhskNMrkZBS5BLJZEnAI4E0tJ YwIjBHQDILUepnsZ9uoVfKDqAu4giI85pFzREetwCyjsXv85v4YzOluA22VOUQM6ulZW 1+GpWMmUTtHYlxMRwjT0UHC5Tg7DI9N3BchfvCFmGexqhJDJ30zLXvFw2GuUhdaq0Bb3 S0ICgSzKVgBee543FC1BioCtUjeBRrSV6V4uK5EGeaoCPG7PfaeU38yHQG2enuTY4kWw dGWBwHMclc2DSKR0Dx/QnIsBGL7lysO1zPXNcNy8rc/gqD2HhtoSRFlIXFmmhJq2mUwz //yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=B+96d9Um; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp20si640869ejc.620.2020.12.09.04.24.00; Wed, 09 Dec 2020 04:24:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=B+96d9Um; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731461AbgLIMRB (ORCPT + 99 others); Wed, 9 Dec 2020 07:17:01 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:55270 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731425AbgLIMQw (ORCPT ); Wed, 9 Dec 2020 07:16:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607516126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zGZTiwKPbzuNxYRc0EhfYab3vSDv6XVztRD7Rd/Qdu8=; b=B+96d9UmQ8maEsVl6/Nkd+kBtgHpoMQIfezPHa3Mb9lyGVStu73GV7tkikAA3vzzNjNLij 0t6iwM5JpZMS9uUiomzDSbJ84hbpKMN9J2SSvmssbTkOnIyrdiyd3oxtGOkHX7s2FhlQjt e6tZ6uh6PUn34mtcFMDFVQbOiMAIic4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-366-tvjdctg3PO-8Q_5Se2UQKw-1; Wed, 09 Dec 2020 07:15:21 -0500 X-MC-Unique: tvjdctg3PO-8Q_5Se2UQKw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D3854107ACE6; Wed, 9 Dec 2020 12:15:20 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-116-67.rdu2.redhat.com [10.10.116.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id ED63C5D719; Wed, 9 Dec 2020 12:15:19 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Subject: [PATCH 07/18] KEYS: remove redundant memset From: David Howells To: Jarkko Sakkinen Cc: Tom Rix , dhowells@redhat.com, keyrings@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 09 Dec 2020 12:15:19 +0000 Message-ID: <160751611918.1238376.7060458630378643472.stgit@warthog.procyon.org.uk> In-Reply-To: <160751606428.1238376.14935502103503420781.stgit@warthog.procyon.org.uk> References: <160751606428.1238376.14935502103503420781.stgit@warthog.procyon.org.uk> User-Agent: StGit/0.23 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tom Rix Reviewing use of memset in keyctrl_pkey.c keyctl_pkey_params_get prologue code to set params up memset(params, 0, sizeof(*params)); params->encoding = "raw"; keyctl_pkey_query has the same prologue and calls keyctl_pkey_params_get. So remove the prologue. Signed-off-by: Tom Rix Signed-off-by: David Howells --- security/keys/keyctl_pkey.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/security/keys/keyctl_pkey.c b/security/keys/keyctl_pkey.c index 931d8dfb4a7f..5de0d599a274 100644 --- a/security/keys/keyctl_pkey.c +++ b/security/keys/keyctl_pkey.c @@ -166,8 +166,6 @@ long keyctl_pkey_query(key_serial_t id, struct kernel_pkey_query res; long ret; - memset(¶ms, 0, sizeof(params)); - ret = keyctl_pkey_params_get(id, _info, ¶ms); if (ret < 0) goto error;