Tetsuo Handa 140eae92cf PM / hibernate: Fix oops at snapshot_write()
commit fc14eebfc20854a38fd9f1d93a42b1783dad4d17 upstream.

syzbot is reporting NULL pointer dereference at snapshot_write() [1].
This is because data->handle is zero-cleared by ioctl(SNAPSHOT_FREE).
Fix this by checking data_of(data->handle) != NULL before using it.

[1] https://syzkaller.appspot.com/bug?id=828a3c71bd344a6de8b6a31233d51a72099f27fd

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reported-by: syzbot <syzbot+ae590932da6e45d6564d@syzkaller.appspotmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-17 11:39:32 +02:00
..
2018-05-30 07:52:41 +02:00
2017-08-16 16:48:34 -07:00
2017-05-18 10:30:19 -06:00
2018-02-03 17:38:47 +01:00
2017-08-21 12:47:31 -07:00
2017-09-08 18:26:48 -07:00
2018-02-22 15:42:24 +01:00
2018-02-22 15:42:24 +01:00
2018-05-09 09:51:50 +02:00