* kernel module seg fault
@ 2005-08-23 9:42 manomugdha biswas
2005-08-23 11:13 ` linux-os (Dick Johnson)
2005-08-23 12:25 ` bunnans
0 siblings, 2 replies; 5+ messages in thread
From: manomugdha biswas @ 2005-08-23 9:42 UTC (permalink / raw)
To: linux-kernel
Hi,
I have written a kernel module and I can load (insmod)
it without any error. But when i run my module it gets
seg fault at interruptible_sleep_on_timeout();
I have used this function in the following way:
DECLARE_WAIT_QUEUE_HEAD(wq);
init_waitqueue_head(&wq);
interruptible_sleep_on_timeout(&wq, 2);
I am using redhat version 9.0 and kernel version
2.4.20-8.
Could you please give some light on this issue?
Manomugdha Biswas
____________________________________________________
Send a rakhi to your brother, buy gifts and win attractive prizes. Log on to http://in.promos.yahoo.com/rakhi/index.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: kernel module seg fault
2005-08-23 9:42 kernel module seg fault manomugdha biswas
@ 2005-08-23 11:13 ` linux-os (Dick Johnson)
2005-08-23 12:25 ` bunnans
1 sibling, 0 replies; 5+ messages in thread
From: linux-os (Dick Johnson) @ 2005-08-23 11:13 UTC (permalink / raw)
To: manomugdha biswas; +Cc: linux-kernel
On Tue, 23 Aug 2005, manomugdha biswas wrote:
> Hi,
> I have written a kernel module and I can load (insmod)
> it without any error. But when i run my module it gets
> seg fault at interruptible_sleep_on_timeout();
>
> I have used this function in the following way:
>
> DECLARE_WAIT_QUEUE_HEAD(wq);
> init_waitqueue_head(&wq);
> interruptible_sleep_on_timeout(&wq, 2);
>
> I am using redhat version 9.0 and kernel version
> 2.4.20-8.
> Could you please give some light on this issue?
>
> Manomugdha Biswas
"seg fault"?? You meen you get a kernel panic? Please
show us what it says. Note you can't sleep with a spin-lock
held.
Cheers,
Dick Johnson
Penguin : Linux version 2.6.12.5 on an i686 machine (5537.79 BogoMips).
Warning : 98.36% of all statistics are fiction.
.
I apologize for the following. I tried to kill it with the above dot :
****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to DeliveryErrors@analogic.com - and destroy all copies of this information, including any attachments, without reading or disclosing them.
Thank you.
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: kernel module seg fault
2005-08-23 9:42 kernel module seg fault manomugdha biswas
2005-08-23 11:13 ` linux-os (Dick Johnson)
@ 2005-08-23 12:25 ` bunnans
2005-08-23 16:34 ` manomugdha biswas
1 sibling, 1 reply; 5+ messages in thread
From: bunnans @ 2005-08-23 12:25 UTC (permalink / raw)
To: 'manomugdha biswas', linux-kernel
Hi Biswas,
You need to post the complete kernel dump message and body of your
source code.
-Bunnan
-----Original Message-----
From: linux-kernel-owner@vger.kernel.org
[mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of manomugdha
biswas
Sent: Tuesday, August 23, 2005 3:13 PM
To: linux-kernel@vger.kernel.org
Subject: kernel module seg fault
Hi,
I have written a kernel module and I can load (insmod)
it without any error. But when i run my module it gets
seg fault at interruptible_sleep_on_timeout();
I have used this function in the following way:
DECLARE_WAIT_QUEUE_HEAD(wq);
init_waitqueue_head(&wq);
interruptible_sleep_on_timeout(&wq, 2);
I am using redhat version 9.0 and kernel version
2.4.20-8.
Could you please give some light on this issue?
Manomugdha Biswas
____________________________________________________
Send a rakhi to your brother, buy gifts and win attractive prizes. Log
on to http://in.promos.yahoo.com/rakhi/index.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel"
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: kernel module seg fault
2005-08-23 12:25 ` bunnans
@ 2005-08-23 16:34 ` manomugdha biswas
2005-08-23 20:38 ` Sam Ravnborg
0 siblings, 1 reply; 5+ messages in thread
From: manomugdha biswas @ 2005-08-23 16:34 UTC (permalink / raw)
To: bunnans; +Cc: linux-kernel
Hi,
This is the code where i am getting this problem.
static byte4
VNICClientStart(unsigned long arg)
{
VNICClientCfgCreateInfo_t clientConfig;
struct socket *sock = NULL;
ubyte4 status = 0;
ubyte4 retryCnt =
VNIC_CLIENT_MAX_CONN_RETRY_CNT;
ubyte4 ret = 0;
byte4 len = 0;
struct net_device *dev = NULL;
VNICConnMap_t *connMap = NULL;
byte4 error = 0;
VNICHdrForm_t vnicHdr;
VNICVirtMirrIfaceAndServIPList_t *ifaceIPNode =
NULL;
DECLARE_WAIT_QUEUE_HEAD(wq);
init_waitqueue_head(&wq);
EnterFunction("VNICClientStart");
memset(&vnicHdr, 0, sizeof(vnicHdr));
while (retryCnt) {
--retryCnt;
if (!retryCnt) {
return VNIC_CLIENT_SERVER_RESPONSE_TIMEOUT;
}
/* wait for small */
interruptible_sleep_on_timeout(&wq, 2);
} /* end while (retryCnt)*/
LeaveFunction("VNICClientStart");
return VNIC_CLIENT_SERVER_SUCCESS; /* for success */
} /* end VNICClientStart() */
I commneted out all the other functionalities of this
function to make it simple but still it is getting
kernel panic.
This function gets called when i invoke ioctl() from
my user application and gets kernel panic.
Regards,
Manomugdha
--- bunnans@yahoo.com wrote:
> Hi Biswas,
>
> You need to post the complete kernel dump message
> and body of your
> source code.
>
> -Bunnan
>
> -----Original Message-----
> From: linux-kernel-owner@vger.kernel.org
> [mailto:linux-kernel-owner@vger.kernel.org] On
> Behalf Of manomugdha
> biswas
> Sent: Tuesday, August 23, 2005 3:13 PM
> To: linux-kernel@vger.kernel.org
> Subject: kernel module seg fault
>
> Hi,
> I have written a kernel module and I can load
> (insmod)
> it without any error. But when i run my module it
> gets
> seg fault at interruptible_sleep_on_timeout();
>
> I have used this function in the following way:
>
> DECLARE_WAIT_QUEUE_HEAD(wq);
> init_waitqueue_head(&wq);
> interruptible_sleep_on_timeout(&wq, 2);
>
> I am using redhat version 9.0 and kernel version
> 2.4.20-8.
> Could you please give some light on this issue?
>
> Manomugdha Biswas
>
>
>
>
>
>
> ____________________________________________________
> Send a rakhi to your brother, buy gifts and win
> attractive prizes. Log
> on to http://in.promos.yahoo.com/rakhi/index.html
> -
> To unsubscribe from this list: send the line
> "unsubscribe linux-kernel"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at
> http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
>
> -
> To unsubscribe from this list: send the line
> "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at
> http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
Manomugdha Biswas
____________________________________________________
Send a rakhi to your brother, buy gifts and win attractive prizes. Log on to http://in.promos.yahoo.com/rakhi/index.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: kernel module seg fault
2005-08-23 16:34 ` manomugdha biswas
@ 2005-08-23 20:38 ` Sam Ravnborg
0 siblings, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2005-08-23 20:38 UTC (permalink / raw)
To: manomugdha biswas; +Cc: bunnans, linux-kernel
You do hide a lot of info.
Without the Makefile we cannot see if you compile this in a decent way.
We cannot see the implmentation of EnterFunction() etc.
A quick grep in the kernel tree revealed very few users
of DECLARE_WIATQUEUE_HEAD, and interruptible_sllep_on_timeout() are
deprecated.
So maybe bringing the driver up to modern state would help.
PS. Ever read CodingStyle?
Sam
On Tue, Aug 23, 2005 at 05:34:21PM +0100, manomugdha biswas wrote:
> Hi,
> This is the code where i am getting this problem.
>
> static byte4
> VNICClientStart(unsigned long arg)
> {
> VNICClientCfgCreateInfo_t clientConfig;
> struct socket *sock = NULL;
> ubyte4 status = 0;
> ubyte4 retryCnt =
> VNIC_CLIENT_MAX_CONN_RETRY_CNT;
> ubyte4 ret = 0;
> byte4 len = 0;
> struct net_device *dev = NULL;
> VNICConnMap_t *connMap = NULL;
> byte4 error = 0;
> VNICHdrForm_t vnicHdr;
> VNICVirtMirrIfaceAndServIPList_t *ifaceIPNode =
> NULL;
>
>
> DECLARE_WAIT_QUEUE_HEAD(wq);
> init_waitqueue_head(&wq);
>
>
> EnterFunction("VNICClientStart");
>
>
> memset(&vnicHdr, 0, sizeof(vnicHdr));
> while (retryCnt) {
> --retryCnt;
>
>
> if (!retryCnt) {
> return VNIC_CLIENT_SERVER_RESPONSE_TIMEOUT;
> }
>
>
> /* wait for small */
> interruptible_sleep_on_timeout(&wq, 2);
> } /* end while (retryCnt)*/
>
> LeaveFunction("VNICClientStart");
> return VNIC_CLIENT_SERVER_SUCCESS; /* for success */
> } /* end VNICClientStart() */
>
> I commneted out all the other functionalities of this
> function to make it simple but still it is getting
> kernel panic.
>
> This function gets called when i invoke ioctl() from
> my user application and gets kernel panic.
>
> Regards,
> Manomugdha
>
>
>
> --- bunnans@yahoo.com wrote:
>
> > Hi Biswas,
> >
> > You need to post the complete kernel dump message
> > and body of your
> > source code.
> >
> > -Bunnan
> >
> > -----Original Message-----
> > From: linux-kernel-owner@vger.kernel.org
> > [mailto:linux-kernel-owner@vger.kernel.org] On
> > Behalf Of manomugdha
> > biswas
> > Sent: Tuesday, August 23, 2005 3:13 PM
> > To: linux-kernel@vger.kernel.org
> > Subject: kernel module seg fault
> >
> > Hi,
> > I have written a kernel module and I can load
> > (insmod)
> > it without any error. But when i run my module it
> > gets
> > seg fault at interruptible_sleep_on_timeout();
> >
> > I have used this function in the following way:
> >
> > DECLARE_WAIT_QUEUE_HEAD(wq);
> > init_waitqueue_head(&wq);
> > interruptible_sleep_on_timeout(&wq, 2);
> >
> > I am using redhat version 9.0 and kernel version
> > 2.4.20-8.
> > Could you please give some light on this issue?
> >
> > Manomugdha Biswas
> >
> >
> >
> >
> >
> >
> > ____________________________________________________
> > Send a rakhi to your brother, buy gifts and win
> > attractive prizes. Log
> > on to http://in.promos.yahoo.com/rakhi/index.html
> > -
> > To unsubscribe from this list: send the line
> > "unsubscribe linux-kernel"
> > in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at
> > http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
> >
> >
> > -
> > To unsubscribe from this list: send the line
> > "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at
> > http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
> >
>
>
> Manomugdha Biswas
>
>
>
>
>
>
> ____________________________________________________
> Send a rakhi to your brother, buy gifts and win attractive prizes. Log on to http://in.promos.yahoo.com/rakhi/index.html
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-08-23 20:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-23 9:42 kernel module seg fault manomugdha biswas
2005-08-23 11:13 ` linux-os (Dick Johnson)
2005-08-23 12:25 ` bunnans
2005-08-23 16:34 ` manomugdha biswas
2005-08-23 20:38 ` Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox