similar to: kmem_cache_alloc() return value check

Displaying 20 results from an estimated 40000 matches similar to: "kmem_cache_alloc() return value check"

2008 Mar 15
1
extent_io.c: bio_add_page() error check for bio ptr
bio_add_page() requires non-NULL bio ptr for dereferencing. Signed-off-by: Peter Teoh <htmldeveloper@gmail.com> --- extent_io.c.orig1 2008-03-16 12:43:59.000000000 +0800 +++ extent_io.c 2008-03-16 12:45:03.000000000 +0800 @@ -1729,6 +1729,7 @@ static int submit_extent_page(int rw, st if (bio_ret && *bio_ret) { bio = *bio_ret; + BUG_ON(!bio);
2017 Mar 13
1
[PATCH] drm: virtio: fix kmem_cache_alloc error check
kmem_cache_alloc returns NULL on error, not ERR_PTR. Fixes: f5985bf9cadd4e3ed8d5d9a9cbbb2e39cdb81cd9 Reported-by: Jiri Slaby <jslaby at suse.cz> Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/virtio/virtgpu_vq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c
2017 Mar 13
1
[PATCH] drm: virtio: fix kmem_cache_alloc error check
kmem_cache_alloc returns NULL on error, not ERR_PTR. Fixes: f5985bf9cadd4e3ed8d5d9a9cbbb2e39cdb81cd9 Reported-by: Jiri Slaby <jslaby at suse.cz> Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/virtio/virtgpu_vq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c
2008 Apr 25
2
reversing the effects of mkfs.btrfs?
I was playing around with btrfs, and did a mkfs.btrfs on one of my partition. Mistakes, it was my data partition (ext3 based). I have not yet mounted the device, but the mkfs.btrfs continued to completion. Is it possible to salvage my ext3 filesystem? Anyway to reverse the effect of mkfs.btrfs? Thank you for your help/answer. -- Regards, Peter Teoh
2009 Jan 19
1
[PATCH] Btrfs: check return value for kthread_run() correctly
kthread_run() returns the kthread or ERR_PTR(-ENOMEM), not NULL. Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com> --- diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 81a3138..f718d25 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1740,13 +1740,13 @@ struct btrfs_root *open_ctree(struct super_block *sb, fs_info->system_alloc_profile =
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
This patch finally gives us full proper -ENOSPC handling for btrfs. Now whenever you do a btrfs_start_transaction, you must specify the number of items you are planning to add/delete/modify. The worst case number of blocks that could be modified by changing that number of items will be calculated and checked against the amount of free space in the space_info where the root you are modifying
2011 Mar 23
0
[PATCH] Btrfs: cleanup some BUG_ON()
This patch changes some BUG_ON() to the error return. (but, most callers still use BUG_ON()) Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> --- fs/btrfs/ctree.c | 3 ++- fs/btrfs/disk-io.c | 5 ++++- fs/btrfs/extent-tree.c | 25 ++++++++++++++++++------- fs/btrfs/file-item.c | 3 ++- fs/btrfs/inode-map.c | 3 ++- fs/btrfs/ioctl.c | 5 ++++-
2011 Jun 29
0
[PATCH v3] Btrfs: fix error check of btrfs_lookup_dentry()
The return value of btrfs_lookup_dentry is checked so that the panic such as illegal address reference should not occur. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> --- V1->V2: unnecessary BUG_ON was deleted V2->V3: to return -ENOENT instead of NULL when no entry was found, return value of btrfs_lookup_dentry is changed. fs/btrfs/inode.c | 10 +++++++---
2013 Dec 13
2
[PATCH] Btrfs: fix error check of btrfs_lookup_dentry()
Clean up btrfs_lookup_dentry() to never return NULL, but PTR_ERR(-ENOENT) instead. This keeps the return value convention consistent. Callers who use btrfs_lookup_dentry() require a trivial update. create_snapshot() in particular looks like it can also lose a BUG_ON(!inode) which is not really needed - there seems less harm in returning ENOENT to userspace at that point in the stack than there
2012 Jan 26
1
[PATCH] btrfs: mask out gfp flasg in releasepage
btree_releasepage is a callback and can be passed unknown gfp flags and then they may end up in kmem_cache_alloc called from alloc_extent_state, slab allocator will BUG_ON when there is HIGHMEM or DMA32 flag set. This may happen when btrfs is mounted from a loop device, which masks out __GFP_IO flag. The check in try_release_extent_state 3399 if ((mask & GFP_NOFS) ==
2019 Jan 06
2
empty list assertion
sorry, ignore my earlier email. I followed this: https://stackoverflow.com/questions/42881901/how-to-compile-some-modules-in-llvm-with-debug-mode-others-with-release-mode and got the debug build completed. On Sat, Jan 5, 2019 at 10:02 AM Peter Teoh <htmldeveloper at gmail.com> wrote: > will this help? > > >
2012 Feb 09
3
[PATCH] Btrfs: return EUCLEAN rather than ENXIO once internal error has occurred for SEEK_DATA/SEEK_HOLE inquiry
By referring to http://linux.die.net/man/2/lseek, return ENXIO only when "offset beyond EOF" for either SEEK_DATA or SEEK_HOLE inquiry. But we return it in case of internal issue too if btrfs_get_extent_fiemap() failed due to other issues. This will confuse the user applications to be expecting ENXIO when trying to find a specific data or hole location once it has occurred. Thanks Dave
2019 Jan 10
2
empty list assertion
In the definition of register classes, have you provided any value types for each class? -Krzysztof On 1/9/2019 7:19 PM, m m via llvm-dev wrote: > The file that is causing this assertion contains only 3 include statements > > |//===-- ABCOther.td - Describe the ABC Target Machine ----*- tablegen > -*-===// // // >
2012 Sep 13
0
[PATCH] btrfs: return EPERM upon rmdir on a subvolume
A subvolume cannot be deleted via rmdir, but the error code ENOTEMPTY is confusing. Return EPERM instead, as this is not permitted. Signed-off-by: David Sterba <dsterba@suse.cz> --- fs/btrfs/inode.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index a4167ef..a67dadd 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@
2011 Apr 28
0
[PATCH] Btrfs: check return value of btrfs_inc_extent_ref()
If return value of btrfs_inc_extent_ref() is not 0, BUG() is called. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> --- fs/btrfs/tree-log.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index f997ec0..23fb42d 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -590,6 +590,7 @@ static noinline int
2008 Apr 10
1
fsfuzz testing: some results
Testing with a modified copy of the fsfuzz, the btrfs filesystem hanged with the following output in dmesg. The system still remain responsive, except for the terminal that was doing the testing. Any attempt to list files in the btrfs-mounted directory will block as well. I am not sure how to proceed from here. Possibly to reboot the system next. But anyone can shed some suggestion?
2011 Jun 28
0
[PATCH v2] Btrfs: fix error check of btrfs_lookup_dentry()
The return value of btrfs_lookup_dentry is checked so that the panic such as illegal address reference should not occur. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> --- V1 -> V2: unnecessary BUG_ON was deleted fs/btrfs/ioctl.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index a3c4751..39c62d3 100644 ---
2011 Jun 09
2
[PATCH] Btrfs: turn to readonly if btrfs_start_transaction() fails
When btrfs_start_transaction() fails, we should call btrfs_std_error() properly for filesystem to readonly. (in this patch, forced readonly framework is used) Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> --- fs/btrfs/file.c | 1 + fs/btrfs/inode.c | 34 +++++++++++++++++++++++++++------- fs/btrfs/ioctl.c | 11 ++++++++++- fs/btrfs/relocation.c | 4 +++-
2012 Oct 01
0
[PATCH] Btrfs: remove unnecessary IS_ERR in bio_readpage_error()
Because the value of extent_map is only a correct value or NULL, so IS_ERR is unnecessary. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> --- fs/btrfs/extent_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 979fa0d..576ed9f 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2071,7 +2071,7 @@ static
2010 Oct 30
0
[PATCH] Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) - generated by Coccinelle
This patch was generated using the Coccinelle scripts and btrfs code in v2.6.36-9657-g7a3f8fe. Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) The semantic patch that makes this change is available in scripts/coccinelle/api/err_cast.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Chris Samuel