cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] GFS2: Use resizable hash table for glocks
@ 2015-07-15 11:13 Dan Carpenter
  2015-07-17 13:49 ` Bob Peterson
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2015-07-15 11:13 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hello Bob Peterson,

The patch 6afe4c76af37: "GFS2: Use resizable hash table for glocks"
from Mar 16, 2015, leads to the following static checker warning:

	fs/gfs2/glock.c:1798 gfs2_glock_iter_next()
	error: 'gi->gl' dereferencing possible ERR_PTR()

fs/gfs2/glock.c
  1793  static void gfs2_glock_iter_next(struct gfs2_glock_rht_iter *gi)
  1794  {
  1795          do {
  1796                  gi->gl = rhashtable_walk_next(&gi->hti);
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
can return -EAGAIN sometimes.

  1797          /* Skip entries for other sb and dead entries */
  1798          } while ((gi->gl) && ((gi->sdp != gi->gl->gl_name.ln_sbd) ||
                                                  ^^^^^^^^
Might be an issue here, might not.  I don't know the subsystem well
enough to know when it returns NULL vs -EAGAIN.

  1799                                __lockref_is_dead(&gi->gl->gl_lockref)));
  1800  }

regards,
dan carpenter



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Cluster-devel] GFS2: Use resizable hash table for glocks
  2015-07-15 11:13 [Cluster-devel] GFS2: Use resizable hash table for glocks Dan Carpenter
@ 2015-07-17 13:49 ` Bob Peterson
  0 siblings, 0 replies; 2+ messages in thread
From: Bob Peterson @ 2015-07-17 13:49 UTC (permalink / raw)
  To: cluster-devel.redhat.com

----- Original Message -----
> Hello Bob Peterson,
> 
> The patch 6afe4c76af37: "GFS2: Use resizable hash table for glocks"
> from Mar 16, 2015, leads to the following static checker warning:
> 
> 	fs/gfs2/glock.c:1798 gfs2_glock_iter_next()
> 	error: 'gi->gl' dereferencing possible ERR_PTR()
> 
> fs/gfs2/glock.c
>   1793  static void gfs2_glock_iter_next(struct gfs2_glock_rht_iter *gi)
>   1794  {
>   1795          do {
>   1796                  gi->gl = rhashtable_walk_next(&gi->hti);
>                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> can return -EAGAIN sometimes.
> 
>   1797          /* Skip entries for other sb and dead entries */
>   1798          } while ((gi->gl) && ((gi->sdp != gi->gl->gl_name.ln_sbd) ||
>                                                   ^^^^^^^^
> Might be an issue here, might not.  I don't know the subsystem well
> enough to know when it returns NULL vs -EAGAIN.
> 
>   1799
>   __lockref_is_dead(&gi->gl->gl_lockref)));
>   1800  }
> 
> regards,
> dan carpenter
> 

Thanks, Dan. I'll craft a fix.

Bob Peterson
Red Hat File Systems



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-17 13:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-15 11:13 [Cluster-devel] GFS2: Use resizable hash table for glocks Dan Carpenter
2015-07-17 13:49 ` Bob Peterson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).