Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1628669ybd; Wed, 26 Jun 2019 22:06:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1XhsPTSj91SOkv+aigXHlflQ2164OUs/Mg37wLtwVbN02x4jLk1Xu2IHaP3Q0yRnl++i7 X-Received: by 2002:a17:902:8b88:: with SMTP id ay8mr2229983plb.139.1561611977076; Wed, 26 Jun 2019 22:06:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561611977; cv=none; d=google.com; s=arc-20160816; b=PoW60Ralzo21AJlUo0kaDYVy0zs10li+g/cIKKwztJ3D5VV7mN1jw3Rl9smO7lyY8P JwMlQc69T+BABqefQgNPhJwwOWeO3X45myxGhwtTMoIQImZlRZ9ThHLVFribaEQVAd7B lVlm94g4vg6HX9Dj+niX5yjvjCzrfugsJXX0aeruqDNvBDZcv9F4dpclYTY++xcbtBo3 WM8v72C7dFdcyMYJXDEcM+bSQacdwIxQ8O4+Py711H054Qz8Z1rhE35nc/gNo/vWyhEc NQDBbXzC5yXZdKM7Zkf1ho/eW2LwjNHX0ucZlMj5UFkQAC59Vx8YMYIt7P0DRtiXSOfV p6LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nsP4OPoyyuGVsj56a75vPqGS9PQmlg/dei1pXS0wrVA=; b=ufnuYojDVJnXXi8PwyAxVIltoPExf/uSU7577pLqjPyxozfVdtYJBkZi09DGH3ud+V j0vHnRc+okQUSxZUMnOimtA2KwjrZfDpOB33F8FKZ2ZetjhrNXXH6ppnc0KPRUzapuvo 6Yd5J7fuIVwHI/IB4PD8etDoDL4l5Jw72Arhyq6uucIGqGObgh0luiQ9HESoLKzVeRP8 51PDDgl7s38XKFx0egM/XDQiNzcDUYpqDuBtgPjwu6thyg0VKfx7Q31Mu7MzdCXuccvv 8vsw7hG41qOki+TtniJkkzp3jOhABpyVKblOB025+q2je4Wq68UjJ68AGYHt7Rc51eia XGFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=H4s1vftu; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 95si1413534ple.51.2019.06.26.22.05.51; Wed, 26 Jun 2019 22:06:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=H4s1vftu; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727300AbfF0FEa (ORCPT + 99 others); Thu, 27 Jun 2019 01:04:30 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:46771 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727279AbfF0FE3 (ORCPT ); Thu, 27 Jun 2019 01:04:29 -0400 Received: by mail-ot1-f68.google.com with SMTP id z23so916070ote.13; Wed, 26 Jun 2019 22:04:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nsP4OPoyyuGVsj56a75vPqGS9PQmlg/dei1pXS0wrVA=; b=H4s1vftufXCodbOeURMTzz5H0zLx9FKRH5i4Lj1xJRnjKWBNUaMIvJRVpY3+WZm1wB d0oP9wM38G6/W7VbvJSsHCT4k5e60hSEnqZDbbshh05nthhn0nnFTZH2RYy2W6aglkee 28VbZDzty8L2VLUBapKwa5oSY70Lh3LFwiadchO8ygReuPSJSO/lXLxFrFgvzoCjbK3C 3l/he5/QsKgc4CLrWaXilKEQNbTUOoqqMvF9mlgGdoFzt3j+PPRjPolllNXXPvOp7k+i NjLVsZ2eu1wPm764ESk1JEcgR0YTBzw64uAepMmxF+s6WIfkWCiNNR5Y6XlDP0QJI4Ns XtAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nsP4OPoyyuGVsj56a75vPqGS9PQmlg/dei1pXS0wrVA=; b=N7MNr0jiqTZYNF5frdxJY48ia1gMjoXXO47sMCwxZE4It6eSOiA4wotYOLda0BkLdq rwWVI3ma+w5xNeMrG9gi4pQIl+a2W4tB9DsNGJVJoVdQXKWT9eXSGTJqPO7JD3Cspdn0 1nRKjFJ7uOf48YclA7LZWOJr+SrHrFQelTVVLSybj29/lhd6QenJXv60MWAccQp1sfXx /cjJlrnWGWdrPMK5JeeaWEVM5eAtYBsGBfKAfx0pNnzkDDWw+3v1thZgeXrRe27Z78CD +lkXbca7EbKX38zVPjFwNc2U+WxlfYEG6mB6YnbJiwFvheP/D0PEf3PsrBc3IzQb9slw brqA== X-Gm-Message-State: APjAAAX+t2rkqrNU6lThM0UPY39izbWMFAemxi4RSodJ/rMsZDtULbTG OqW1p2RmZ5DVtkmobqWWwCQ= X-Received: by 2002:a9d:588a:: with SMTP id x10mr1832241otg.144.1561611869236; Wed, 26 Jun 2019 22:04:29 -0700 (PDT) Received: from rYz3n.attlocal.net ([2600:1700:210:3790::48]) by smtp.googlemail.com with ESMTPSA id v18sm613318otn.17.2019.06.26.22.04.28 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 26 Jun 2019 22:04:28 -0700 (PDT) From: Jiunn Chang To: skhan@linuxfoundation.org Cc: linux-kernel-mentees@lists.linuxfoundation.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, johannes@sipsolutions.net Subject: [Linux-kernel-mentees][PATCH v3] nl80211: Fix undefined behavior in bit shift Date: Thu, 27 Jun 2019 00:04:26 -0500 Message-Id: <20190627050426.17925-3-c0d1n61at3@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190627032532.18374-4-c0d1n61at3@gmail.com> References: <20190627032532.18374-4-c0d1n61at3@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Shifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned. Signed-off-by: Jiunn Chang --- Changes included in v3: - remove change log from patch description Changes included in v2: - use subsystem specific subject lines - CC required mailing lists include/uapi/linux/nl80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 6f09d1500960..fa7ebbc6ff27 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -5314,7 +5314,7 @@ enum nl80211_feature_flags { NL80211_FEATURE_TDLS_CHANNEL_SWITCH = 1 << 28, NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR = 1 << 29, NL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR = 1 << 30, - NL80211_FEATURE_ND_RANDOM_MAC_ADDR = 1 << 31, + NL80211_FEATURE_ND_RANDOM_MAC_ADDR = 1U << 31, }; /** -- 2.22.0