staging: gasket: Fix incongruency in handling of sysfs entries creation
authorLuis Mendes <luis.p.mendes@gmail.com>
Fri, 3 Apr 2020 15:15:34 +0000 (16:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Apr 2020 14:33:14 +0000 (16:33 +0200)
commitfcfd63da5d8285df02f1332adc98c10ba4551011
tree4c2719030448e60b6c9e44eb3ca5e3aeac91b382
parentf4f235309b5cc8e6217774279ae2b263345f5f6a
staging: gasket: Fix incongruency in handling of sysfs entries creation

commit 9195d762042b0e5e4ded63606b4b30a93cba4400 upstream.

Fix incongruency in handling of sysfs entries creation.
This issue could cause invalid memory accesses, by not properly
detecting the end of the sysfs attributes array.

Fixes: 84c45d5f3bf1 ("staging: gasket: Replace macro __ATTR with __ATTR_NULL")
Signed-off-by: Luis Mendes <luis.p.mendes@gmail.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200403151534.20753-1-luis.p.mendes@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gasket/gasket_sysfs.c
drivers/staging/gasket/gasket_sysfs.h