similar to: [Bug] check return of kmalloc()

Displaying 20 results from an estimated 400 matches similar to: "[Bug] check return of kmalloc()"

2011 Feb 15
1
[PATCH] Btrfs: fix uncheck memory allocations
To make Btrfs code more robust, several return value checks where memory allocation can fail are introduced. I use BUG_ON where I don''t know how to handle the error properly, which increases the number of using the notorious BUG_ON, though. Signed-off-by: Yoshinori Sano <yoshinori.sano@gmail.com> --- fs/btrfs/compression.c | 6 ++++++ fs/btrfs/extent-tree.c | 4 ++++
2011 Feb 12
3
[PATCH] fix uncheck memory allocations
To make Btrfs code more robust, several return value checks where memory allocation can fail are introduced. I use BUG_ON where I don''t know how to handle the error properly, which increases the number of using the notorious BUG_ON, though. Signed-off-by: Yoshinori Sano <yoshinori.sano@gmail.com> --- fs/btrfs/compression.c | 6 ++++++ fs/btrfs/extent-tree.c | 2 ++
2013 Apr 25
0
[PATCH] Btrfs: remove almost all of the BUG()'s from tree-log.c
There were a whole bunch and I was doing it for other things. I haven''t tested these error paths but at the very least this is better than panicing. I''ve only left 2 BUG_ON()''s since they are logic errors and I want to replace them with a ASSERT framework that we can compile out for production users. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com> ---
2013 Aug 04
0
[PATCH] Btrfs: fix inode leak on kmalloc failure in tree-log.c
In tree-log.c:replay_one_name(), if memory allocation for the name fails, ensure we iput the dir inode we got before before we return. Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com> --- fs/btrfs/tree-log.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index ff60d89..6797a93 100644 ---
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
Document those places in the btrfs code which are BUGing on non-fatal error conditions that should be handled by proper error paths. This makes it easier to distinguish between what needs fixing versus which BUG_ON''s we might want to keep (to trap code bugs, unexpected inconsistencies, etc). Do this with a trivial macro, ''btrfs_fixable_bug_on'' which just defines to
2002 Jan 30
1
Patch: update zlib/* to 1.1.3
This patch (apologies for the size) updates zlib/* to the files that ship with zlib 1.1.3. Index: zlib/ChangeLog =================================================================== RCS file: /cvsroot/rsync/zlib/ChangeLog,v retrieving revision 1.1 diff -u -r1.1 ChangeLog --- zlib/ChangeLog 7 May 1998 06:19:41 -0000 1.1 +++ zlib/ChangeLog 30 Jan 2002 01:12:41 -0000 @@ -1,6 +1,54 @@ ChangeLog
2013 Nov 12
0
[PATCH] Btrfs: incompatible format change to remove hole extents V4
Btrfs has always had these filler extent data items for holes in inodes. This has made somethings very easy, like logging hole punches and sending hole punches. However for large holey files these extent data items are pure overhead. So add an incompatible feature to no longer add hole extents to reduce the amount of metadata used by these sort of files. This has a few changes for logging and
2013 Mar 10
1
[PATCH] fs: fs2fs: Replaced calls to kmalloc and memcpy with kmemdup
Replaced calls to kmalloc followd by memcpy with a single call to kmemdup. This patch was found using coccicheck. Signed-off-by: Alexandru Gheorghiu <gheorghiuandru at gmail.com> --- fs/ocfs2/localalloc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c index aebeacd..839183f 100644 --- a/fs/ocfs2/localalloc.c +++
2013 Feb 15
1
[PATCH] btrfs: use kmalloc for lzo de/compress buffer
The size of de/compress buffer and LZO1X_MEM_COMPRESS is small enough. Allocating it with kmalloc rather than vmalloc is preferred. This patch depends on my previous patch, “btrfs: fix decompress buffer size”. Signed-off-by: Kyungsik Lee <kyungsik.lee@lge.com> Cc: David Sterba <dsterba@suse.cz> --- fs/btrfs/lzo.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
2011 Aug 15
9
[patch v2 0/9] btrfs: More error handling patches
Hi all - The following 9 patches add more error handling to the btrfs code: - Add btrfs_panic - Catch locking failures in {set,clear}_extent_bit - Push up set_extent_bit errors to callers - Push up lock_extent errors to callers - Push up clear_extent_bit errors to callers - Push up unlock_extent errors to callers - Make pin_down_extent return void - Push up btrfs_pin_extent errors to
2012 Jul 25
0
[PATCH 08/16] btrfs: nuke pdflush from comments
From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> The pdflush thread is long gone, so this patch removes references to pdflush from btrfs comments. Cc: Chris Mason <chris.mason@fusionio.com> Cc: linux-btrfs@vger.kernel.org Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> --- I expect this patch to be merged via Al Viro''s VFS tree.
2009 Nov 12
0
[PATCH 03/12] Btrfs: Rewrite btrfs_drop_extents
Rewrite btrfs_drop_extents by using btrfs_duplicate_item, so we can avoid calling lock_extent within transaction. Signed-off-by: Yan Zheng <zheng.yan@oracle.com> --- fs/btrfs/ctree.h | 7 +- fs/btrfs/file.c | 659 ++++++++++++++++++++------------------------------- fs/btrfs/inode.c | 27 +-- fs/btrfs/ioctl.c | 3 +- fs/btrfs/tree-log.c | 4 +- 5 files changed, 277
2012 Aug 01
7
[PATCH] Btrfs: barrier before waitqueue_active
We need an smb_mb() before waitqueue_active to avoid missing wakeups. Before Mitch was hitting a deadlock between the ordered flushers and the transaction commit because the ordered flushers were waiting for more refs and were never woken up, so those smp_mb()''s are the most important. Everything else I added for correctness sake and to avoid getting bitten by this again somewhere else.
2013 Jun 28
1
[PATCH V3] ocfs2: xattr: fix inlined xattr reflink
Inlined xattr shared free space of inode block with inlined data or data extent record, so the size of the later two should be adjusted when inlined xattr is enabled. See ocfs2_xattr_ibody_init(). But this isn't done well when reflink. For inode with inlined data, its max inlined data size is adjusted in ocfs2_duplicate_inline_data(), no problem. But for inode with data extent record, its
2010 Jun 12
0
[PATCH] Btrfs: fix CLONE ioctl destination file size expansion to block boundary
The CLONE and CLONE_RANGE ioctls round up the range of extents being cloned to the block size when the range to clone extends to the end of file (this is always the case with CLONE). It was then using that offset when extending the destination file''s i_size. Fix this by not setting i_size beyond the originally requested ending offset. This bug was introduced by a22285a6 (2.6.35-rc1).
2010 Nov 17
0
[PATCH] Btrfs: handle NFS lookups properly
People kept reporting NFS issues, specifically getting ESTALE alot. I figured out how to reproduce the problem SERVER mkfs.btrfs /dev/sda1 mount /dev/sda1 /mnt/btrfs-test <add /mnt/btrfs-test to /etc/exports> btrfs subvol create /mnt/btrfs-test/foo service nfs start CLIENT mount server:/mnt/btrfs /mnt/test cd /mnt/test/foo ls SERVER echo 3 > /proc/sys/vm/drop_caches CLIENT ls
2013 Oct 17
0
[PATCH] Btrfs-progs: fix btrfsck improper prompt on dropping snapshots
Exec btrfsck on btrfs with snapshots that are under a dropping progress will cause prompt on "ref mismatch". However we do not want this kind of prompt, since an remount operation will continue the dropping progress. Here the prompt is nonsense. Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com> --- cmds-check.c | 101
2013 Mar 15
0
[PATCH] Btrfs-progs: add skinny metadata support to progs V3
This fixes up the progs to properly deal with skinny metadata. This adds the -x option to mkfs and btrfstune for enabling the skinny metadata option. This also makes changes to fsck so it can properly deal with the skinny metadata entries. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com> --- V2->V3: update the mkfs.btrfs man page with the new option This is based on
2011 Aug 26
0
[PATCH] Btrfs: make some functions return void
The type of some functions that return only 0 is changed to ''void''. In addition, the check on the return value in the caller of these functions becomes unnecessary. So, these check is removed. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> --- fs/btrfs/async-thread.c | 17 ++++-------- fs/btrfs/async-thread.h | 4 +- fs/btrfs/compression.c | 14 ++++------
2011 Oct 04
68
[patch 00/65] Error handling patchset v3
Hi all - Here''s my current error handling patchset, against 3.1-rc8. Almost all of this patchset is preparing for actual error handling. Before we start in on that work, I''m trying to reduce the surface we need to worry about. It turns out that there is a ton of code that returns an error code but never actually reports an error. The patchset has grown to 65 patches. 46 of them