Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp592756imm; Fri, 12 Oct 2018 03:35:15 -0700 (PDT) X-Google-Smtp-Source: ACcGV63tDF8n26cX/5Axti+BYATNOTAD2VNpSUjDkleik6WeLgbic2iKTladkrLtQDwKHFNiaSZx X-Received: by 2002:a17:902:b198:: with SMTP id s24-v6mr5139808plr.70.1539340515293; Fri, 12 Oct 2018 03:35:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539340515; cv=none; d=google.com; s=arc-20160816; b=EDl5RCysB2FUkjIAQGmCTAMpdKf77CMXKQRWJxAfzXwjgPxP4gHZHy+Ay/JiwvEL0p iBIs0BsOktQJpcFkrS8ulSOAkiNh3wLH799GXyWhg4RR8Wwoc8Kp+oGbHWLUbOCuWHHe cbrqfTcdntVazCOvCgL8Az6OIZbVqIAnzH+kp3/fD9QziiFCooPtBa1jqZefOGcpOkKy LSnYPC6jFV/i4loIcAFiEHSMkLx6TLVTWwtGzuubAjKkSpGtlGfpGaDhZTUzYeV8HvTv OwLwll4orOyBPeW9lJrC9T4T3HIR0f15rVkgk0DLlZya36BrhfV4F+DS4BpCdo4ytNm5 oEVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=b9wmY14mrz352RKbMwMV/E2oly/Kc1nL5BnTnwKURIw=; b=gOiYfhQOSKPVHXMtmn99W8Gqj7HSq43tPgeGgGyqh4IJ5a8sJk5Jio3alFYPoStfEP KHmrcIzoz9OdNZf+y5tyS19okluTuKN9iU+dlT8FydHmdOOTiK9mAZ4jH8ttqBe0lxc1 IBmJNmstGnY/q+CHeevKUxuLfbYQnBCsrtRBByANyLJ+v/5kcISlt60ZLzwYny6ABlpx oW5UJe2j0oVDo9UH3adQ9YEHrsdxLQw4tmLRMo+tsXcVtdTxuXbN6PVVzfgPjI0BKDNY mNNG0oJ3Ge+cPn+KrzSlTyk9cAaFTemeeETvQFw/pztti1WRrvn2a7jypjWeMqcj2SPD NT5A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p1-v6si943609plb.197.2018.10.12.03.34.58; Fri, 12 Oct 2018 03:35:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727853AbeJLSGK (ORCPT + 99 others); Fri, 12 Oct 2018 14:06:10 -0400 Received: from lgeamrelo13.lge.com ([156.147.23.53]:51718 "EHLO lgeamrelo11.lge.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726788AbeJLSGK (ORCPT ); Fri, 12 Oct 2018 14:06:10 -0400 Received: from unknown (HELO lgemrelse6q.lge.com) (156.147.1.121) by 156.147.23.53 with ESMTP; 12 Oct 2018 19:34:22 +0900 X-Original-SENDERIP: 156.147.1.121 X-Original-MAILFROM: kyeongdon.kim@lge.com Received: from unknown (HELO localhost.localdomain) (10.168.176.142) by 156.147.1.121 with ESMTP; 12 Oct 2018 19:34:22 +0900 X-Original-SENDERIP: 10.168.176.142 X-Original-MAILFROM: kyeongdon.kim@lge.com From: Kyeongdon Kim To: davem@davemloft.net, ktkhai@virtuozzo.com, viro@zeniv.linux.org.uk, garsilva@embeddedor.com, jbaron@akamai.com, dvlasenk@redhat.com, xiyou.wangcong@gmail.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kyeongdon.kim@lge.com Subject: [PATCH] net: fix waring in af_unix Date: Fri, 12 Oct 2018 19:34:14 +0900 Message-Id: <1539340454-67970-1-git-send-email-kyeongdon.kim@lge.com> X-Mailer: git-send-email 2.6.2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This fixes the "'hash' may be used uninitialized in this function" net/unix/af_unix.c:1041:20: warning: 'hash' may be used uninitialized in this function [-Wmaybe-uninitialized] addr->hash = hash ^ sk->sk_type; ^ Signed-off-by: Kyeongdon Kim --- net/unix/af_unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index d1edfa3..e6cecc8 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -989,7 +989,7 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) struct sockaddr_un *sunaddr = (struct sockaddr_un *)uaddr; char *sun_path = sunaddr->sun_path; int err; - unsigned int hash; + unsigned int hash = 0; struct unix_address *addr; struct hlist_head *list; struct path path = { }; -- 2.6.2