cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] Fixing an invalid return error code, which leads to a panic in 64 bits.
@ 2006-10-17  9:39 Mathieu Avila
  2006-10-19  8:13 ` Mathieu Avila
  0 siblings, 1 reply; 2+ messages in thread
From: Mathieu Avila @ 2006-10-17  9:39 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hello GFS folks,

Sometimes, i get a panic at mount time, following messages saying it
cannot start the threads:
lock_gulm: ERROR Faild to send lock login. -111
lock_gulm: ERROR glq_startup failed. 111
lock_gulm: ERROR Got a 111 trying to start the threads.

A few lines later, a panic occurs in "do_kern_mount", because the
return value of "fill_super" is interpreted as a pointer and
dereferenced, instead of being interpreted as an error code.

This is due to the way "fs/super.c" interprets pointer return values,
using "ERR_PTR(ptr)", defined in include/linux/err.h
To detect that a pointer is in fact an error code, the return value
must be negative, at least on 64 bits.
returning a positive error code leads to considering the value as a
pointer, not an error code and the panic follows.

The first time the error is reported in GULM, it is
negative, then it is changed to a positive value. The patch doesn't
change it to a positive value.



diff src/gulm/gulm_lock_queue.c src-b/gulm/gulm_lock_queue.c
813c813
<               return -err;
---
>               return err;


Please tell me if this is the good way to fix this bug,

Thanks in advance,

--
Mathieu Avila



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

end of thread, other threads:[~2006-10-19  8:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-17  9:39 [Cluster-devel] [PATCH] Fixing an invalid return error code, which leads to a panic in 64 bits Mathieu Avila
2006-10-19  8:13 ` Mathieu Avila

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).