All of lore.kernel.org
 help / color / mirror / Atom feed
* bug report: potential null deref send_mds_reconnect()
@ 2010-05-13 23:36 Dan Carpenter
  2010-05-14  4:22 ` Sage Weil
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-05-13 23:36 UTC (permalink / raw)
  To: Sage Weil; +Cc: ceph-devel

This is a Smatch thing.

fs/ceph/mds_client.c +2217 send_mds_reconnect(82) error: we previously assumed 'session' could be null.
  2176          down_read(&mdsc->snap_rwsem);
  2177
  2178          if (!session)
  2179                  goto send;

	If we hit this goto then we will dereference session and oops.

  2180          dout("session %p state %s\n", session,
  2181               session_state_name(session->s_state));
 
regards,
dan carpenter

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

* Re: bug report: potential null deref send_mds_reconnect()
  2010-05-13 23:36 bug report: potential null deref send_mds_reconnect() Dan Carpenter
@ 2010-05-14  4:22 ` Sage Weil
  0 siblings, 0 replies; 2+ messages in thread
From: Sage Weil @ 2010-05-14  4:22 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: ceph-devel

On Fri, 14 May 2010, Dan Carpenter wrote:
> This is a Smatch thing.
> 
> fs/ceph/mds_client.c +2217 send_mds_reconnect(82) error: we previously assumed 'session' could be null.
>   2176          down_read(&mdsc->snap_rwsem);
>   2177
>   2178          if (!session)
>   2179                  goto send;
> 
> 	If we hit this goto then we will dereference session and oops.
> 
>   2180          dout("session %p state %s\n", session,
>   2181               session_state_name(session->s_state));

Yeah, this is a bit of a mess.  There is already a fix (and big cleanup of 
this function) in the unstable branch, queued up for the next merge 
window.  I forgot it's theoretically possible to hit this with the current 
code (although only with the clustered mds).  If I send a final set fixes 
for .34 I'll include something for this too...

Thanks!
sage

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

end of thread, other threads:[~2010-05-14  4:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-13 23:36 bug report: potential null deref send_mds_reconnect() Dan Carpenter
2010-05-14  4:22 ` Sage Weil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.