From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: "Luis R. Rodriguez" <mcgrof@gmail.com>,
"jirislaby@gmail.com" <jirislaby@gmail.com>,
"ath5k-devel@lists.ath5k.org" <ath5k-devel@lists.ath5k.org>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [ath5k-devel] [PATCH] ath5k: prevent infinite loop
Date: Tue, 19 May 2009 09:38:47 -0700 [thread overview]
Message-ID: <20090519163847.GA7428@tesla> (raw)
In-Reply-To: <alpine.DEB.2.00.0905190743070.1767@gandalf.stny.rr.com>
On Tue, May 19, 2009 at 04:45:14AM -0700, Steven Rostedt wrote:
>
> On Mon, 18 May 2009, Luis R. Rodriguez wrote:
>
> > On Mon, May 18, 2009 at 11:32 PM, Nick Kossifidis <mickflemm@gmail.com> wrote:
> > > 2009/5/19 Steven Rostedt <rostedt@goodmis.org>:
> > >>
> > >> On Tue, 19 May 2009, Nick Kossifidis wrote:
> > >>>
> > >>> This is already fixed on wireless-testing ;-)
> > >>> http://git.kernel.org/?p=linux/kernel/git/linville/wireless-testing.git;a=blob;f=drivers/net/wireless/ath/ath5k/phy.c;h=d0d1c350025aebba1fe4e17a44550536a59951ba;hb=HEAD
> > >>
> > >> Thanks, but this does only half. Although I did not hit this in my laptop,
> > >> it can be an issue. If step[0] == step[1] you have the same problem.
> > >>
> > >
> > > Having the same power value for 2 different steps is something we can
> > > expect (although docs say that we expect the line to be monotonically
> > > increasing but anyway), having the same step twice is way out of spec,
> > > there is no way we can have the same step twice on EEPROM, only if we
> > > have a corrupted EEPROM (we need to add some sanity checks indeed here
> > > -> http://git.kernel.org/?p=linux/kernel/git/linville/wireless-testing.git;a=blob;f=drivers/net/wireless/ath/ath5k/eeprom.c;h=c56b494d417acd40d445d922f2861b53cc2315df;hb=HEAD#l910
> > > to handle such a case but first we need to have a "default" eeprom
> > > dataset to fallback when we get such errors).
> >
> > Don't bother with busted EEPROMs, if its busted its busted. Chances
> > are the complexity we'd need to add to deal with such devices is
> > simply not worth it.
>
> My concern is that a busted EEPROM should not lock up the kernel, when we
> can avoid it.
Sure, which is why there is a checksum which can be checked first.
IIRC we don't bail out if that fails in ath5k.
> Put in a nasty WARN_ON if the steps are equal, and exit the
> routine. But don't let it go into an infinite loop and have the user
> wondering why their system just locked up.
Sure, my point was more for not implemention a default EEPROM
as that would bring more complexity to the driver.
Luis
WARNING: multiple messages have this Message-ID (diff)
From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: "Luis R. Rodriguez" <mcgrof@gmail.com>,
"jirislaby@gmail.com" <jirislaby@gmail.com>,
"ath5k-devel@lists.ath5k.org" <ath5k-devel@venema.h4ckr.net>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [ath5k-devel] [PATCH] ath5k: prevent infinite loop
Date: Tue, 19 May 2009 09:38:47 -0700 [thread overview]
Message-ID: <20090519163847.GA7428@tesla> (raw)
In-Reply-To: <alpine.DEB.2.00.0905190743070.1767@gandalf.stny.rr.com>
On Tue, May 19, 2009 at 04:45:14AM -0700, Steven Rostedt wrote:
>
> On Mon, 18 May 2009, Luis R. Rodriguez wrote:
>
> > On Mon, May 18, 2009 at 11:32 PM, Nick Kossifidis <mickflemm@gmail.com> wrote:
> > > 2009/5/19 Steven Rostedt <rostedt@goodmis.org>:
> > >>
> > >> On Tue, 19 May 2009, Nick Kossifidis wrote:
> > >>>
> > >>> This is already fixed on wireless-testing ;-)
> > >>> http://git.kernel.org/?p=linux/kernel/git/linville/wireless-testing.git;a=blob;f=drivers/net/wireless/ath/ath5k/phy.c;h=d0d1c350025aebba1fe4e17a44550536a59951ba;hb=HEAD
> > >>
> > >> Thanks, but this does only half. Although I did not hit this in my laptop,
> > >> it can be an issue. If step[0] == step[1] you have the same problem.
> > >>
> > >
> > > Having the same power value for 2 different steps is something we can
> > > expect (although docs say that we expect the line to be monotonically
> > > increasing but anyway), having the same step twice is way out of spec,
> > > there is no way we can have the same step twice on EEPROM, only if we
> > > have a corrupted EEPROM (we need to add some sanity checks indeed here
> > > -> http://git.kernel.org/?p=linux/kernel/git/linville/wireless-testing.git;a=blob;f=drivers/net/wireless/ath/ath5k/eeprom.c;h=c56b494d417acd40d445d922f2861b53cc2315df;hb=HEAD#l910
> > > to handle such a case but first we need to have a "default" eeprom
> > > dataset to fallback when we get such errors).
> >
> > Don't bother with busted EEPROMs, if its busted its busted. Chances
> > are the complexity we'd need to add to deal with such devices is
> > simply not worth it.
>
> My concern is that a busted EEPROM should not lock up the kernel, when we
> can avoid it.
Sure, which is why there is a checksum which can be checked first.
IIRC we don't bail out if that fails in ath5k.
> Put in a nasty WARN_ON if the steps are equal, and exit the
> routine. But don't let it go into an infinite loop and have the user
> wondering why their system just locked up.
Sure, my point was more for not implemention a default EEPROM
as that would bring more complexity to the driver.
Luis
next prev parent reply other threads:[~2009-05-19 16:38 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-19 0:28 [PATCH] ath5k: prevent infinite loop Steven Rostedt
2009-05-19 0:28 ` Steven Rostedt
2009-05-19 0:34 ` Nick Kossifidis
2009-05-19 0:34 ` Nick Kossifidis
2009-05-19 0:43 ` Steven Rostedt
2009-05-19 0:43 ` Steven Rostedt
2009-05-19 6:32 ` Nick Kossifidis
2009-05-19 6:32 ` Nick Kossifidis
2009-05-19 6:39 ` [ath5k-devel] " Luis R. Rodriguez
2009-05-19 6:39 ` Luis R. Rodriguez
2009-05-19 11:45 ` Steven Rostedt
2009-05-19 11:45 ` Steven Rostedt
2009-05-19 16:38 ` Luis R. Rodriguez [this message]
2009-05-19 16:38 ` Luis R. Rodriguez
2009-05-19 11:42 ` Bob Copeland
2009-05-19 11:42 ` Bob Copeland
2009-05-19 11:54 ` Steven Rostedt
2009-05-19 11:54 ` Steven Rostedt
2009-05-19 12:34 ` Bob Copeland
2009-05-19 12:34 ` Bob Copeland
2009-05-20 3:37 ` [PATCH] ath5k: avoid and warn on potential " Bob Copeland
2009-05-20 3:37 ` Bob Copeland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090519163847.GA7428@tesla \
--to=lrodriguez@atheros.com \
--cc=akpm@linux-foundation.org \
--cc=ath5k-devel@lists.ath5k.org \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mcgrof@gmail.com \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.