]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "Staging: drivers: rtl8188eu: use sizeof(*ptr) instead of sizeof(struct)"
authorHans de Goede <hdegoede@redhat.com>
Sun, 5 Jun 2016 19:01:18 +0000 (21:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Jun 2016 18:21:45 +0000 (11:21 -0700)
commit2891cd14c918a8a860bb20427b36c3776e18f2be
tree1cd619c2c8c558bb709340bc72cd8855298ed39f
parent27be0830d40f5bce4a90ab400af53e2837e81e8f
Revert "Staging: drivers: rtl8188eu: use sizeof(*ptr) instead of sizeof(struct)"

This reverts commit 7a9c6e842f9a ("Staging: drivers: rtl8188eu: use
sizeof(*ptr) instead of sizeof(struct)").

This commit is wrong, as adapt->HalData has a type of "void *", so
now we are allocating a much to small struct, which causes the driver
to overwrite random memory which leads to a non working driver and
various system crashes.

Cc: Jacky Boen <aqiank@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/hal/usb_halinit.c