Tetsuo Handa fc14eebfc2 PM / hibernate: Fix oops at snapshot_write()
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>
2018-05-27 12:00:02 +02:00
..
2018-02-10 13:16:35 -08:00
2018-04-10 11:27:30 -07:00
2017-08-16 16:48:34 -07:00
2018-04-06 15:01:25 -07:00
2018-03-15 20:34:40 +01:00
2017-05-18 10:30:19 -06:00
2018-01-05 18:43:00 +11:00
2018-04-11 10:28:35 -07:00
2018-04-30 12:09:56 -04:00