lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150930132207.GH7340@mwanda>
Date:	Wed, 30 Sep 2015 16:22:07 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Chandra Gorentla <csgorentla@...il.com>
Cc:	rachel.kim@...el.com, dean.lee@...el.com, chris.park@...el.com,
	gregkh@...uxfoundation.org, devel@...verdev.osuosl.org,
	linux-wireless@...r.kernel.org, johnny.kim@...el.com,
	linux-kernel@...r.kernel.org, sudipm.mukherjee@...il.com
Subject: Re: [PATCH 1/2] drivers: staging: wilc1000: Replace message queue
 with standard Linux lists

On Wed, Sep 30, 2015 at 06:12:50PM +0530, Chandra Gorentla wrote:
> > >  	while (1) {
> > > -		wilc_mq_recv(&gMsgQHostIF, &msg, sizeof(struct host_if_msg), &u32Ret);
> > > +		ret = wilc_mq_recv(&gMsgQHostIF, &msg,
> > > +					sizeof(struct host_if_msg), &u32Ret);
> > > +		if (ret)
> > > +			continue;
> > > +
> > 
> > I asked before if this was a forever loop and never got a response.
> > Also what does this have to do with list macros?
> The only exit condition of this loop is to receive a message
> 'HOST_IF_MSG_EXIT'.  If this check is not there and 'wilc_mq_recv'
> returns an error, the switch case below it will be executed for
> the previously received message.

Oh, hm...  It looks like wilc_mq_recv() can return -EFAULT, -EOVERFLOW
or success here.  If it returns -EFUALT is calling wilc_mq_recv() again
really the right thing?  I suspect we should break in that case.  We
should probably at least sleep for a bit intsead of looping so tightly
if it returns -EOVERFLOW?

I'm not sure.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ