[S390] monreader: fix use after free bug with suspend/resume
authorGerald Schaefer <gerald.schaefer@de.ibm.com>
Fri, 13 Nov 2009 14:43:51 +0000 (15:43 +0100)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Fri, 13 Nov 2009 14:45:03 +0000 (15:45 +0100)
commitccaf6553963bc6304d5820962a08a4397d0a2dc2
tree55b301555c75a43fd905c4cdf5af175c1e0d29bb
parent156171c71a0dc4bce12b4408bb1591f8fe32dc1a
[S390] monreader: fix use after free bug with suspend/resume

The monreader device driver doesn't set dev->driver_data to NULL after
freeing the corresponding data structure. This leads to a use after
free bug in the freeze/thaw suspend/resume functions after the device
has been opened and closed once. Fix this by clearing dev->driver_data
in the close() function.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/char/monreader.c