thunderbolt: Remove superfluous check
PATCH 1/3 thunderbolt: Remove superfluous check
The key size is tested by hex2bin() already (as '\0' isn't an hex digit)
--- drivers/thunderbolt/switch.c | 3 --- 1 file changed, 3 deletions(-)
drivers/thunderbolt/switch.c +0 -3
@@ -808,9 +808,6 @@ static ssize_t key_store(struct device *dev, struct device_attribute *attr,u8 key[TB_SWITCH_KEY_SIZE ];ssize_t ret = count; -if (count <64 ) -return -EINVAL ; -if (hex2bin (key, buf,sizeof (key)))return -EINVAL ;
Signature · 1 line
2.7.4
Quoted 4 lines · Yehezkel
The key size is tested by
hex2bin()already (as '\0' isn't an hex digit)Suggested-by Andy Shevchenko <[email protected]>Signed-off-by Yehezkel Bernat <[email protected]>
Quoted 1 line · Yehezkel
The key size is tested by
hex2bin()already (as '\0' isn't an hex digit)
Yes, and it's guaranteed (by kernelfs) that '\0' will be there sooner or later.
Quoted 1 line
Suggested-by Andy Shevchenko <[email protected]>
I'm using @linux.intel.com, though for this tag it really doesn't matter.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 7 lines · Mika Westerberg
Quoted 4 lines · Yehezkel
The key size is tested by
hex2bin()already (as '\0' isn't an hex digit)Suggested-by Andy Shevchenko <[email protected]>Signed-off-by Yehezkel Bernat <[email protected]>Acked-by Mika Westerberg <[email protected]>
Hi Greg,
Do you have any comments regarding these patches? If not could you take them to your char-misc tree?
Thanks!
Quoted 7 lines · Mika Westerberg
Quoted 6 lines · Mika Westerberg
Quoted 4 lines · Yehezkel
The key size is tested by
hex2bin()already (as '\0' isn't an hex digit)Suggested-by Andy Shevchenko <[email protected]>Signed-off-by Yehezkel Bernat <[email protected]>
Quoted 6 lines
Quoted 1 line
Acked-by Mika Westerberg <[email protected]>Hi Greg,
Do you have any comments regarding these patches? If not could you take them to your char-misc tree?
Will do, thanks.
greg k-h
Quoted 12 lines · Greg Kroah-Hartman
Quoted 11 lines · Mika Westerberg
Quoted 9 lines · Mika Westerberg
Quoted 6 lines · Yehezkel
The key size is tested by
hex2bin()already (as '\0' isn't an hex digit)Suggested-by Andy Shevchenko <[email protected]>Signed-off-by Yehezkel Bernat <[email protected]>Acked-by Mika Westerberg <[email protected]>
Quoted 8 lines
Quoted 5 lines
Hi Greg,
Do you have any comments regarding these patches? If not could you take
them to your char-misc tree?Will do, thanks.
greg k-h
Hi Greg,
I'm not sure if you intended to do so anyway, but I think it worth adding to v4.13, as these are fixes (and somewhat security related).
Thanks,
Yehezkel
Quoted 18 lines · Yehezkel
Quoted 17 lines · Greg Kroah-Hartman
Quoted 16 lines · Mika Westerberg
Quoted 9 lines · Mika Westerberg
Quoted 6 lines · Yehezkel
The key size is tested by
hex2bin()already (as '\0' isn't an hex digit)Suggested-by Andy Shevchenko <[email protected]>Signed-off-by Yehezkel Bernat <[email protected]>Acked-by Mika Westerberg <[email protected]>Hi Greg,
Do you have any comments regarding these patches? If not could you take
them to your char-misc tree?
Quoted 8 lines
Quoted 3 lines
Will do, thanks.
greg k-h
Hi Greg,
I'm not sure if you intended to do so anyway, but I think it worth adding to v4.13, as these are fixes (and somewhat security related).
I didn't intend to, it's a bit late for 4.13, if you think these should be backported, let [email protected] know the git commit ids when they land in Linus's tree, and I'll be glad to backport them.
thanks,
greg k-h