[Cluster-devel] [bug report] gfs2: Use mapping->gfp_mask for metadata inodes

2023-08-02 Thread Dan Carpenter
ereference 287 288 return inode; 289 } regards, dan carpenter

[Cluster-devel] [bug report] fs: dlm: trace user space callbacks

2022-08-29 Thread Dan Carpenter
int mode, uint32_t flags, uint32_t lkid, char *lvb_in, 5909 unsigned long timeout_cs) 5910 #else regards, dan carpenter

[Cluster-devel] [kbuild] [gfs2:for-next 9/11] fs/gfs2/file.c:796:24: sparse: unsigned int *

2022-03-17 Thread Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git for-next head: a20050c14edf19add5a9588cb196bb00aa410650 commit: 165d142ffacdef3e620819a1031df3d896aa29ab [9/11] gfs2: Fix should_fault_in_pages() logic config: sh-randconfig-s032-20220313

Re: [Cluster-devel] fs/dlm/midcomms.c:913:22: sparse: sparse: restricted __le32 degrades to integer

2022-01-24 Thread Dan Carpenter
On Sun, Jan 23, 2022 at 01:41:52PM -0500, Alexander Aring wrote: > > I see also: > > fs/dlm/midcomms.c:213:1: sparse: sparse: symbol > '__srcu_struct_nodes_srcu' was not declared. Should it be static? > Why not just do this? (Untested. Maybe I don't understand?) diff --git

[Cluster-devel] [PATCH] fs: dlm: uninitialized variable on error in dlm_listen_for_all()

2022-01-15 Thread Dan Carpenter
The "sock" variable is not initialized on this error path. Cc: sta...@vger.kernel.org Fixes: 2dc6b1158c28 ("fs: dlm: introduce generic listen") Signed-off-by: Dan Carpenter --- fs/dlm/lowcomms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/dlm

[Cluster-devel] [bug report] gfs2: Introduce flag for glock holder auto-demotion

2021-11-08 Thread Dan Carpenter
;next pointer. So I think that means we could hit a forever loop situation looking for the original >gl_holders list head. Should it use list_for_each_entry_safe()? 436 } 437 } 438 } regards, dan carpenter

[Cluster-devel] [bug report] new ->follow_link() and ->put_link() calling conventions

2021-08-31 Thread Dan Carpenter
if (size == 0) { 1811 gfs2_consist_inode(ip); 1812 buf = ERR_PTR(-EIO); 1813 goto out; 1814 } 1815 1816 error = gfs2_meta_inode_buffer(ip, ); 1817 if (error) { regards, dan carpenter

[Cluster-devel] [bug report] GFS2: Fix bug-trap in ail flush code

2021-07-28 Thread Dan Carpenter
&& atomic_read(>gl_ail_count)); 81 spin_unlock(>sd_ail_lock); 82 gfs2_log_unlock(sdp); 83 } regards, dan carpenter

[Cluster-devel] [gfs2:for-next.mmap-fault 6/9] fs/iomap/direct-io.c:134 iomap_dio_complete() error: dereferencing freed memory 'dio'

2021-07-27 Thread Dan Carpenter
(attached as .config) compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter smatch warnings: fs/iomap/direct-io.c:134 iomap_dio_complete() error: dereferencing freed memory 'dio

Re: [Cluster-devel] [PATCH][next] fs: dlm: Fix memory leak of object mh

2021-05-26 Thread Dan Carpenter
On Wed, May 26, 2021 at 04:11:06PM +0100, Colin Ian King wrote: > On 26/05/2021 16:01, Dan Carpenter wrote: > > On Wed, May 26, 2021 at 02:40:39PM +0100, Colin King wrote: > >> From: Colin Ian King > >> > >> There is an error return path that is not

Re: [Cluster-devel] [PATCH][next] fs: dlm: Fix memory leak of object mh

2021-05-26 Thread Dan Carpenter
rc_in->rc_buf, len); > + kfree(mh); Am I looking at the same code as you? (I often am not able to review your patches because you're doing development on stuff that hasn't hit linux-next). Anyway, to me this doesn't seem like the correct fix at all. There are some other th

Re: [Cluster-devel] [PATCH 000/141] Fix fall-through warnings for Clang

2020-12-01 Thread Dan Carpenter
t; case 0: > ++x; > default: > ; > } Don't warn for this. If adding a break statement changes the flow of the code then warn about potentially missing break statements, but if it doesn't change anything then don't warn about it. regards, dan carpenter

[Cluster-devel] [gfs2:for-next.bob7f 4/13] fs/gfs2/super.c:1477 gfs2_evict_inode() error: we previously assumed 'ip->i_gl' could be null (see line 1444)

2020-09-10 Thread Dan Carpenter
(attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter smatch warnings: fs/gfs2/super.c:1477 gfs2_evict_inode() error: we previously assumed 'ip->i_gl' could be null (

[Cluster-devel] [gfs2:for-next.bob7e 4/13] fs/gfs2/super.c:1494 gfs2_evict_inode() warn: variable dereferenced before check 'ip->i_gl' (see line 1444)

2020-09-03 Thread Dan Carpenter
(attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter smatch warnings: fs/gfs2/super.c:1494 gfs2_evict_inode() warn: variable dereferenced before check 'ip->i_gl' (see l

[Cluster-devel] [gfs2:for-next.bob6m 6/11] fs/gfs2/super.c:1443 gfs2_evict_inode() error: potentially dereferencing uninitialized 'metamapping'.

2020-08-24 Thread Dan Carpenter
(attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter New smatch warnings: fs/gfs2/super.c:1443 gfs2_evict_inode() error: potentially dereferencing uninitialized 'metamapping

[Cluster-devel] [gfs2:for-next.bob6m 5/11] fs/gfs2/super.c:1458 gfs2_evict_inode() error: uninitialized symbol 'error'.

2020-08-24 Thread Dan Carpenter
as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter smatch warnings: fs/gfs2/super.c:1458 gfs2_evict_inode() error: uninitialized symbol 'error'. # https://git.kernel.org/pub/scm

[Cluster-devel] [bug report] gfs2: Move inode generation number check into gfs2_inode_lookup

2020-06-09 Thread Dan Carpenter
urn ERR_PTR(error); ^ Leading to a NULL return. It doesn't look like the caller checks for NULL so it might lead to an Oops. 228 } regards, dan carpenter

[Cluster-devel] [bug report] gfs2: Force withdraw to replay journals and wait for it to finish

2020-02-26 Thread Dan Carpenter
haw_super() function. 136 } else { 137 wait_on_bit(>gl_flags, GLF_DEMOTE, TASK_UNINTERRUPTIBLE); regards, dan carpenter

[Cluster-devel] [bug report] gfs2: dump fsid when dumping glock problems

2019-08-09 Thread Dan Carpenter
llx f:%s t:%s d:%s/%llu a:%d " See also: fs/gfs2/util.c:184 gfs2_consist_rgrpd_i() error: format string overflow. buf_size: 270 length: 277 fs/gfs2/rgrp.c:2293 gfs2_rgrp_error() error: format string overflow. buf_size: 270 length: 277 regards, dan carpenter

[Cluster-devel] [PATCH] dlm: Fix test for -ERESTARTSYS

2019-02-05 Thread Dan Carpenter
The minus sign is missing so this condition is never true. Fixes: 5c1597bfeb2c ("dlm: retry wait_event_interruptible in event of ERESTARTSYS") Signed-off-by: Dan Carpenter --- Static analysis. Not tested. fs/dlm/lockspace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[Cluster-devel] [gfs2:iomap-alloc 3/8] fs//gfs2/bmap.c:173 __gfs2_unstuff_dinode() error: uninitialized symbol 'error'.

2018-08-31 Thread Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git iomap-alloc head: f5aa3885760697824600cc6cd94c917a40744e82 commit: 4dcaab0cd2cc2107c4ab770c48d766794decc337 [3/8] gfs2: Move empty inode check out of gfs2_unstuff_dinode smatch warnings: fs//gfs2/bmap.c:173

[Cluster-devel] [bug report] [GFS2] The core of GFS2

2018-07-11 Thread Dan Carpenter
if (!prev) 1115 prev = dent; 1116 1117 moved = 1; 1118 } else { 1119 prev = dent; 1120 } 1121 dent = next; 1122 } while (dent); 1123 regards, dan carpenter

[Cluster-devel] [gfs2:iomap-write 1/5] fs/gfs2/bmap.c:870 gfs2_iomap_get() error: uninitialized symbol 'dibh'.

2018-06-25 Thread Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git iomap-write head: 3cf7648de3f378723b38a432d620e5c65516844e commit: 6b465904a278c702e9ba1e51c12f82d09ccf88db [1/5] gfs2: Further iomap cleanups smatch warnings: fs/gfs2/bmap.c:870 gfs2_iomap_get() error: uninitialized

[Cluster-devel] [bug report] GFS2: Withdraw for IO errors writing to the journal or statfs

2017-08-24 Thread Dan Carpenter
cks for NULL. 948 gfs2_log_flush(sdp, NULL, NORMAL_FLUSH); 949 return sdp->sd_log_error; ^ Patch adds unchecked dereference. 950 } regards, dan carpenter

[Cluster-devel] [patch] GFS2: Fix reference to ERR_PTR in gfs2_glock_iter_next

2016-12-14 Thread Dan Carpenter
If rhashtable_walk_next() returned PTR_ERR(-EAGAIN) then that would cause an Oops. Fixes: 88ffbf3e037e ("GFS2: Use resizable hash table for glocks") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> --- Is the comment in the right place? If not then please just fix it and

Re: [Cluster-devel] [bug report] GFS2: Use resizable hash table for glocks

2016-12-14 Thread Dan Carpenter
:/ I'm not a fan of this patch at all. Let me send my take on this and you can pick whichever you prefer. regards, dan carpenter

Re: [Cluster-devel] [bug report] GFS2: Use resizable hash table for glocks

2016-12-14 Thread Dan Carpenter
other sb and dead entries */ > | 1813 } while ((gi->gl) && ((gi->sdp != gi->gl->gl_name.ln_sbd) || > | > | to here where we dereference gi->gl. It's weird that Smatch is only > | complaining about this now though... > | > | 1814 > | __lockref

[Cluster-devel] [bug report] GFS2: Use resizable hash table for glocks

2016-12-14 Thread Dan Carpenter
kref_is_dead(>gl->gl_lockref))); 1815 } regards, dan carpenter

Re: [Cluster-devel] GFS2: Extract quota data from reservations structure (revert 5407e24)

2015-11-18 Thread Dan Carpenter
^^^ Dereference. 574 575 if (gfs2_assert_warn(sdp, !ip->i_qadata->qa_qd_num) || regards, dan carpenter

Re: [Cluster-devel] [GFS2 PATCH] GFS2: Handle errors from rhashtable_walk_next

2015-08-03 Thread Dan Carpenter
checker bug here. This patch adds some needed error checking after calling function rhashtable_walk_next. Looks good. regards, dan carpenter

Re: [Cluster-devel] GFS2: Use resizable hash table for glocks

2015-07-15 Thread Dan Carpenter
__lockref_is_dead(gi-gl-gl_lockref))); 1800 } regards, dan carpenter

Re: [Cluster-devel] gfs2: fix quota updates on block boundaries

2015-06-04 Thread Dan Carpenter
negative on quota usage */ 803 qd-qd_qb.qb_value = q.qu_value; 804 if (fdq) { regards, dan carpenter

Re: [Cluster-devel] GFS2: Move most of the remaining inode.c into ops_inode.c

2015-01-25 Thread Dan Carpenter
On Sat, Jan 24, 2015 at 08:19:47PM +, Steven Whitehouse wrote: Hi, On 24/01/15 19:45, Dan Carpenter wrote: Hello Steven Whitehouse, The [some really old patch], leads to the following static checker warning: fs/gfs2/inode.c:203 gfs2_inode_lookup() error: passing non

Re: [Cluster-devel] GFS2: Move most of the remaining inode.c into ops_inode.c

2015-01-24 Thread Dan Carpenter
negative 13 to ERR_PTR fs/gfs2/inode.c:1567 gfs2_follow_link() error: passing non negative 13 to ERR_PTR regards, dan carpenter

[Cluster-devel] [patch] fs: NULL dereference in posix_acl_to_xattr()

2014-02-14 Thread Dan Carpenter
This patch moves the dereference of buffer after the check for NULL. The only place which passes a NULL parameter is gfs2_set_acl(). Cc: stable sta...@vger.kernel.org Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/fs/posix_acl.c b/fs/posix_acl.c index 11c54fd51e16

[Cluster-devel] [patch] GFS2: alloc_workqueue() doesn't return an ERR_PTR

2013-08-15 Thread Dan Carpenter
alloc_workqueue() returns a NULL on error, it doesn't return an ERR_PTR. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index a9d8caf..5433777 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -1844,14 +1844,14 @@ int __init

[Cluster-devel] [patch] dlm: some checks can underflow

2013-07-31 Thread Dan Carpenter
() We get namelen from receive_extralen(ms); - find_rsb() It's never perfectly clear how invasive to make a fix like this. Many of the changes in the patch are not needed but I wanted to make things consistent. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- Compile

Re: [Cluster-devel] [patch] dlm: some checks can underflow

2013-07-31 Thread Dan Carpenter
On Wed, Jul 31, 2013 at 11:11:56AM -0400, David Teigland wrote: On Wed, Jul 31, 2013 at 12:02:29PM +0300, Dan Carpenter wrote: This is a static checker fix. We have several places here that check the upper limit without checking for negative numbers. One example of this is in find_rsb

Re: [Cluster-devel] GFS2: Combine functions gfs2_glock_wait and wait_on_holder

2013-02-26 Thread Dan Carpenter
; Can this be GLR_TRYFAILED at this point? If it is then it would cause a problem later on. 903 } regards, dan carpenter