From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:46780 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751238AbdIPB2y (ORCPT ); Fri, 15 Sep 2017 21:28:54 -0400 Subject: Patch "thunderbolt: Remove superfluous check" has been added to the 4.13-stable tree To: yehezkel.bernat@intel.com, andriy.shevchenko@intel.com, gregkh@linuxfoundation.org, mika.westerberg@linux.intel.com Cc: , From: Date: Fri, 15 Sep 2017 18:28:47 -0700 Message-ID: <15055253277769@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled thunderbolt: Remove superfluous check to the 4.13-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: thunderbolt-remove-superfluous-check.patch and it can be found in the queue-4.13 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 8fdd6ab36197ad891233572c57781b1f537da0ac Mon Sep 17 00:00:00 2001 From: "Bernat, Yehezkel" Date: Tue, 15 Aug 2017 08:19:01 +0300 Subject: thunderbolt: Remove superfluous check From: Bernat, Yehezkel commit 8fdd6ab36197ad891233572c57781b1f537da0ac upstream. The key size is tested by hex2bin() already (as '\0' isn't an hex digit) Suggested-by: Andy Shevchenko Signed-off-by: Yehezkel Bernat Acked-by: Mika Westerberg Signed-off-by: Greg Kroah-Hartman --- drivers/thunderbolt/switch.c | 3 --- 1 file changed, 3 deletions(-) --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -808,9 +808,6 @@ static ssize_t key_store(struct device * u8 key[TB_SWITCH_KEY_SIZE]; ssize_t ret = count; - if (count < 64) - return -EINVAL; - if (hex2bin(key, buf, sizeof(key))) return -EINVAL; Patches currently in stable-queue which might be from yehezkel.bernat@intel.com are queue-4.13/thunderbolt-make-key-root-only-accessible.patch queue-4.13/thunderbolt-remove-superfluous-check.patch queue-4.13/thunderbolt-allow-clearing-the-key.patch