android_kernel_xiaomi_sm8350/fs/xfs
Nathan Scott 0e1edbd999 [XFS] Fix xfs_free_extent related NULL pointer dereference.
We recently fixed an out-of-space deadlock in XFS, and part of that fix
involved the addition of the XFS_ALLOC_FLAG_FREEING flag to some of the
space allocator calls to indicate they're freeing space, not allocating
it. There was a missed xfs_alloc_fix_freelist condition test that did not
correctly test "flags". The same test would also test an uninitialised
structure field (args->userdata) and depending on its value either would
or would not return early with a critical buffer pointer set to NULL.

This fixes that up, adds asserts to several places to catch future botches
of this nature, and skips sections of xfs_alloc_fix_freelist that are
irrelevent for the space-freeing case.

SGI-PV: 955303
SGI-Modid: xfs-linux-melb:xfs-kern:26743a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2006-08-10 14:40:41 +10:00
..
linux-2.6 [XFS] Fix a barrier related forced shutdown on mounts with quota enabled. 2006-07-28 17:05:13 +10:00
quota [XFS] All xfs_disk_dquot_t values are (as the name says) disk endian. 2006-07-28 17:04:26 +10:00
support [XFS] Portability changes: remove prdev, stick to one diagnostic 2006-06-09 15:29:40 +10:00
Kbuild
Kconfig [XFS] Remove unneeded conditional code on NFS export interface related 2006-06-19 08:40:27 +10:00
Makefile
Makefile-linux-2.6 [XFS] Remove files from the build that are now unused. 2006-06-20 14:53:51 +10:00
xfs_acl.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_acl.h [XFS] Resolve a namespace collision on remaining vtypes for FreeBSD 2006-06-09 17:07:12 +10:00
xfs_ag.h [XFS] We really suck at spulling. Thanks to Chris Pascoe for fixing all 2006-03-29 08:55:14 +10:00
xfs_alloc_btree.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_alloc_btree.h
xfs_alloc.c [XFS] Fix xfs_free_extent related NULL pointer dereference. 2006-08-10 14:40:41 +10:00
xfs_alloc.h [XFS] In actual allocation of file system blocks and freeing extents, the 2006-06-09 14:55:18 +10:00
xfs_arch.h
xfs_attr_leaf.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_attr_leaf.h
xfs_attr_sf.h
xfs_attr.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_attr.h [XFS] Resolve a namespace collision on vnode/vnodeops for FreeBSD porters. 2006-06-09 17:00:52 +10:00
xfs_behavior.c [XFS] We really suck at spulling. Thanks to Chris Pascoe for fixing all 2006-03-29 08:55:14 +10:00
xfs_behavior.h [XFS] remove unused behaviour lock - shrink XFS vnode as a side effect. 2006-06-27 16:12:15 +10:00
xfs_bit.c
xfs_bit.h
xfs_bmap_btree.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_bmap_btree.h
xfs_bmap.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_bmap.h [XFS] Add parameters to xfs_bmapi() and xfs_bunmapi() to have them report 2006-06-09 14:48:12 +10:00
xfs_btree.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_btree.h
xfs_buf_item.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_buf_item.h
xfs_cap.h [XFS] Resolve a namespace collision on vnode/vnodeops for FreeBSD porters. 2006-06-09 17:00:52 +10:00
xfs_clnt.h [XFS] Implement the silent parameter to fill_super, previously ignored. 2006-03-31 13:04:17 +10:00
xfs_da_btree.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_da_btree.h [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dfrag.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dfrag.h [XFS] Add parameters to xfs_bmapi() and xfs_bunmapi() to have them report 2006-06-09 14:48:12 +10:00
xfs_dinode.h [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dir2_block.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dir2_block.h
xfs_dir2_data.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dir2_data.h [XFS] endianess annotations for xfs_dir2_data_entry_t 2006-06-09 14:48:37 +10:00
xfs_dir2_leaf.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dir2_leaf.h
xfs_dir2_node.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dir2_node.h
xfs_dir2_sf.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dir2_sf.h
xfs_dir2_trace.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dir2_trace.h
xfs_dir2.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dir2.h [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dmapi.h [XFS] Resolve a namespace collision on vfs/vfsops for FreeBSD porters. 2006-06-09 16:48:30 +10:00
xfs_dmops.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_error.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_error.h [XFS] Implement the silent parameter to fill_super, previously ignored. 2006-03-31 13:04:17 +10:00
xfs_extfree_item.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_extfree_item.h [XFS] inode items and EFI/EFDs have different ondisk format for 32bit and 2006-06-09 14:55:38 +10:00
xfs_fs.h [XFS] Add degframentation exclusion support 2006-06-09 14:54:19 +10:00
xfs_fsops.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_fsops.h
xfs_ialloc_btree.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_ialloc_btree.h
xfs_ialloc.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_ialloc.h
xfs_iget.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_imap.h
xfs_inode_item.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_inode_item.h [XFS] inode items and EFI/EFDs have different ondisk format for 32bit and 2006-06-09 14:55:38 +10:00
xfs_inode.c [XFS] Ensure bulkstat from an invalid inode number gets caught always with 2006-07-28 17:05:51 +10:00
xfs_inode.h [XFS] Resolve a namespace collision on vnode/vnodeops for FreeBSD porters. 2006-06-09 17:00:52 +10:00
xfs_inum.h
xfs_iocore.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_iomap.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_iomap.h
xfs_itable.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_itable.h [XFS] Remove dead code from come bulkstat paths. 2006-06-09 15:29:22 +10:00
xfs_log_priv.h
xfs_log_recover.c [XFS] Rework code snippets slightly to remove remaining recent-gcc 2006-06-28 10:13:52 +10:00
xfs_log_recover.h
xfs_log.c [XFS] Fix remount vs no/barrier options by ensuring we clear unwanted 2006-07-28 17:04:44 +10:00
xfs_log.h [XFS] We really suck at spulling. Thanks to Chris Pascoe for fixing all 2006-03-29 08:55:14 +10:00
xfs_mac.h
xfs_mount.c Merge git://oss.sgi.com:8090/nathans/xfs-2.6 2006-06-27 19:09:16 -07:00
xfs_mount.h [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_qmops.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_quota.h [XFS] Resolve a namespace collision on vfs/vfsops for FreeBSD porters. 2006-06-09 16:48:30 +10:00
xfs_refcache.h
xfs_rename.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_rtalloc.c [XFS] Fix realtime subvolume expansion, a porting bug b0rked it. Coverity 2006-06-28 08:42:26 +10:00
xfs_rtalloc.h
xfs_rw.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_rw.h [XFS] Push some common code out of write path into core XFS code for 2006-06-19 08:39:53 +10:00
xfs_sb.h
xfs_trans_ail.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_trans_buf.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_trans_extfree.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_trans_inode.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_trans_item.c [XFS] Portability changes: remove prdev, stick to one diagnostic 2006-06-09 15:29:40 +10:00
xfs_trans_priv.h
xfs_trans_space.h [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_trans.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_trans.h [XFS] Reduce size of xfs_trans_t structure. * remove ->t_forw, ->t_back -- 2006-06-27 16:12:40 +10:00
xfs_types.h
xfs_utils.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_utils.h [XFS] Resolve a namespace collision on remaining vtypes for FreeBSD 2006-06-09 17:07:12 +10:00
xfs_vfsops.c [XFS] Fix a barrier related forced shutdown on mounts with quota enabled. 2006-07-28 17:05:13 +10:00
xfs_vnodeops.c [XFS] link(2) on directory is banned in VFS. 2006-06-27 12:45:17 +10:00
xfs.h