Re: [Cluster-devel] [ha-wg] [Planning] Organizing HA Summit 2015
All, On 1/13/2015 6:31 AM, Digimer wrote: > Hi all, > > With Fabio away for now, I (and others) are working on the final > preparations for the summit. This is your chance to speak up and > influence the planning! Objections/suggestions? Speak now please. :) Digimer, I would like to thank you very much for helping in the organization of the summit. I unfortunately have to cancel my travel and won´t be able to attend myself. Maybe I´ll join some sessions remotely if time allows. I wish everybody to have a great time in Brno and make the best out of it! I am really looking forward to see the outcome when so many brilliant people will sit in the same room. Cheers Fabio
Re: [Cluster-devel] GFS2: Move most of the remaining inode.c into ops_inode.c
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 167 set_bit(GIF_INVALID, &ip->i_flags); 168 error = gfs2_glock_nq_init(io_gl, LM_ST_SHARED, GL_EXACT, &ip->i_iopen_gh); ^^ It looks like this function can return GLR_TRYFAILED. The caller is only expecting normal ERR_PTRs so it could cause an oops. This does not request a try lock, so it should never return the GLR_TRYFAILED value. I think the checker is perhaps not following the code well enough to figure that out? Steve. 169 if (unlikely(error)) 170 goto fail_iopen; 171 172 ip->i_iopen_gh.gh_gl->gl_object = ip; 173 gfs2_glock_put(io_gl); 174 io_gl = NULL; 175 176 if (type == DT_UNKNOWN) { 177 /* Inode glock must be locked already */ 178 error = gfs2_inode_refresh(GFS2_I(inode)); 179 if (error) 180 goto fail_refresh; 181 } else { 182 inode->i_mode = DT2IF(type); 183 } 184 185 gfs2_set_iop(inode); 186 unlock_new_inode(inode); 187 } 188 189 return inode; 190 191 fail_refresh: 192 ip->i_iopen_gh.gh_flags |= GL_NOCACHE; 193 ip->i_iopen_gh.gh_gl->gl_object = NULL; 194 gfs2_glock_dq_uninit(&ip->i_iopen_gh); 195 fail_iopen: 196 if (io_gl) 197 gfs2_glock_put(io_gl); 198 fail_put: 199 ip->i_gl->gl_object = NULL; 200 gfs2_glock_put(ip->i_gl); 201 fail: 202 iget_failed(inode); 203 return ERR_PTR(error); 204 } Related: fs/gfs2/inode.c:203 gfs2_inode_lookup() error: passing non negative 13 to ERR_PTR fs/gfs2/inode.c:218 gfs2_lookup_by_inum() error: passing non negative 13 to ERR_PTR fs/gfs2/inode.c:243 gfs2_lookup_by_inum() error: passing non negative 13 to ERR_PTR fs/gfs2/inode.c:306 gfs2_lookupi() error: passing non negative 13 to ERR_PTR fs/gfs2/inode.c:324 gfs2_lookupi() error: passing non negative 13 to ERR_PTR fs/gfs2/inode.c:852 __gfs2_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
Re: [Cluster-devel] GFS2: Move most of the remaining inode.c into ops_inode.c
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 167 set_bit(GIF_INVALID, &ip->i_flags); 168 error = gfs2_glock_nq_init(io_gl, LM_ST_SHARED, GL_EXACT, &ip->i_iopen_gh); ^^ It looks like this function can return GLR_TRYFAILED. The caller is only expecting normal ERR_PTRs so it could cause an oops. 169 if (unlikely(error)) 170 goto fail_iopen; 171 172 ip->i_iopen_gh.gh_gl->gl_object = ip; 173 gfs2_glock_put(io_gl); 174 io_gl = NULL; 175 176 if (type == DT_UNKNOWN) { 177 /* Inode glock must be locked already */ 178 error = gfs2_inode_refresh(GFS2_I(inode)); 179 if (error) 180 goto fail_refresh; 181 } else { 182 inode->i_mode = DT2IF(type); 183 } 184 185 gfs2_set_iop(inode); 186 unlock_new_inode(inode); 187 } 188 189 return inode; 190 191 fail_refresh: 192 ip->i_iopen_gh.gh_flags |= GL_NOCACHE; 193 ip->i_iopen_gh.gh_gl->gl_object = NULL; 194 gfs2_glock_dq_uninit(&ip->i_iopen_gh); 195 fail_iopen: 196 if (io_gl) 197 gfs2_glock_put(io_gl); 198 fail_put: 199 ip->i_gl->gl_object = NULL; 200 gfs2_glock_put(ip->i_gl); 201 fail: 202 iget_failed(inode); 203 return ERR_PTR(error); 204 } Related: fs/gfs2/inode.c:203 gfs2_inode_lookup() error: passing non negative 13 to ERR_PTR fs/gfs2/inode.c:218 gfs2_lookup_by_inum() error: passing non negative 13 to ERR_PTR fs/gfs2/inode.c:243 gfs2_lookup_by_inum() error: passing non negative 13 to ERR_PTR fs/gfs2/inode.c:306 gfs2_lookupi() error: passing non negative 13 to ERR_PTR fs/gfs2/inode.c:324 gfs2_lookupi() error: passing non negative 13 to ERR_PTR fs/gfs2/inode.c:852 __gfs2_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