summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-10-11 09:00:22 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-10-11 09:00:22 -0700
commitce3861819a5bcb0762c0b627e43ced1683227807 (patch)
tree36c37e9882b4ea9aa60a847f2a2110b342ea545c /fs
parenta957fd420ca8774f1a6708c64a867f056e67c46e (diff)
parent1cfd0ddd82232804e03f3023f6a58b50dfef0574 (diff)
downloadlinux-ce3861819a5bcb0762c0b627e43ced1683227807.tar.bz2
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs fixes from Al Viro: "Fairly old DIO bug caught by Andreas (3.10+) and several slightly younger blk_rq_map_user_iov() bugs, both on map and copy codepaths (Vitaly and me)" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: bio_copy_user_iov(): don't ignore ->iov_offset more bio_map_user_iov() leak fixes fix unbalanced page refcounting in bio_map_user_iov direct-io: Prevent NULL pointer access in submit_page_section
Diffstat (limited to 'fs')
-rw-r--r--fs/direct-io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/direct-io.c b/fs/direct-io.c
index 62cf812ed0e5..96415c65bbdc 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -866,7 +866,8 @@ out:
*/
if (sdio->boundary) {
ret = dio_send_cur_page(dio, sdio, map_bh);
- dio_bio_submit(dio, sdio);
+ if (sdio->bio)
+ dio_bio_submit(dio, sdio);
put_page(sdio->cur_page);
sdio->cur_page = NULL;
}