OSDN Git Service

staging: next: configfs: fix release link
authorChristian Gromm <christian.gromm@microchip.com>
Thu, 23 Jan 2020 15:38:22 +0000 (16:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Jan 2020 09:08:41 +0000 (10:08 +0100)
commitf9e6b51a998da782cfc201dc9309d3a3d8579fef
tree237b69ed9111f03a2a046a26f9a199a69e76bf51
parentb7935e52dd98696a8c1379f5b67b0c344ee3bc35
staging: next: configfs: fix release link

The functions link_destroy and link_release are both deleting list items.
link_release, however, does not check whether a certain link has already
been deleted from the list by function link_destroy. By fixing this
this patch prevents a kernel crash when removing the configuration
directory of a link that already has been destroyed.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1579793906-5054-7-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/configfs.c