Re: [PATCH] exfat: fix random stack corruption after get_block

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



+                       /*
+                        * No buffer_head is allocated.
+                        * (1) bmap: It's enough to fill bh_result without I/O.
+                        * (2) read: The unwritten part should be filled with 0
+                        *           If a folio does not have any buffers,
+                        *           let's returns -EAGAIN to fallback to
+                        *           per-bh IO like block_read_full_folio().
+                        */
+                       if (!folio_buffers(bh_result->b_folio)) {
+                               err = -EAGAIN;
+                               goto done;
+                       }

bh_result is set as mapped by map_bh(), should we need to clear it if return an error?

+
+                       BUG_ON(size > sb->s_blocksize);

This check is equivalent to the following condition and is not necessary.

                } else if (iblock == valid_blks &&
                           (ei->valid_size & (sb->s_blocksize - 1))) {







[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux