]> sourceware.org Git - systemtap.git/commitdiff
PR11861: tolerate null struct bio->bi_vcnt in __bio_ino tapset fn
authorKapileshwar Singh (KP) <kapileshwarsingh@gmail.com>
Fri, 30 Jul 2010 17:29:32 +0000 (13:29 -0400)
committerFrank Ch. Eigler <fche@elastic.org>
Fri, 30 Jul 2010 17:31:35 +0000 (13:31 -0400)
Jeff Moyer confirms operations such as blkdev_issue_flush
can submit an empty bio.

tapset/ioblock.stp

index 23f792dc8a10e27555b19deca3e5d5a178db390f..80452e966b01acc01e3c26eb91944007d362dde5 100644 (file)
@@ -17,7 +17,7 @@
 function __bio_ino:long(bio:long)
 %{ /* pure */
     struct bio *bio = (struct bio *)(long)THIS->bio;
-    struct page *bv_page = bio? kread(&(bio->bi_io_vec[0].bv_page)) : NULL;
+    struct page *bv_page = (bio && bio->bi_vcnt) ? kread(&(bio->bi_io_vec[0].bv_page)) : NULL;
     struct address_space *mapping;
     struct inode *host;
     THIS->__retvalue = -1;
This page took 0.030485 seconds and 5 git commands to generate.