ereference
287
288 return inode;
289 }
regards,
dan carpenter
int mode, uint32_t flags, uint32_t lkid, char
*lvb_in,
5909 unsigned long timeout_cs)
5910 #else
regards,
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
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
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
;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
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
&& atomic_read(>gl_ail_count));
81 spin_unlock(>sd_ail_lock);
82 gfs2_log_unlock(sdp);
83 }
regards,
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
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
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
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
(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 (
(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
(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
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
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
haw_super() function.
136 } else {
137 wait_on_bit(>gl_flags, GLF_DEMOTE,
TASK_UNINTERRUPTIBLE);
regards,
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
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(-)
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
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
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
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
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
:/ 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
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
kref_is_dead(>gl->gl_lockref)));
1815 }
regards,
dan carpenter
^^^
Dereference.
574
575 if (gfs2_assert_warn(sdp, !ip->i_qadata->qa_qd_num) ||
regards,
dan carpenter
checker bug here.
This patch adds some needed error checking after calling function
rhashtable_walk_next.
Looks good.
regards,
dan carpenter
__lockref_is_dead(gi-gl-gl_lockref)));
1800 }
regards,
dan carpenter
negative on quota usage */
803 qd-qd_qb.qb_value = q.qu_value;
804 if (fdq) {
regards,
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
negative 13 to ERR_PTR
fs/gfs2/inode.c:1567 gfs2_follow_link() error: passing non negative 13 to
ERR_PTR
regards,
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
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
()
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
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
;
Can this be GLR_TRYFAILED at this point? If it is then it would
cause a problem later on.
903 }
regards,
dan carpenter
39 matches
Mail list logo