From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: stable-review@kernel.org, torvalds@linux-foundation.org,
akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk,
Alan Stern <stern@rowland.harvard.edu>
Subject: [8/8] USB: io_ti: check firmware version before updating
Date: Tue, 24 Aug 2010 15:17:01 -0700 [thread overview]
Message-ID: <20100824221820.752126412@clark.site> (raw)
In-Reply-To: <20100824224631.GA5458@kroah.com>
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
Content-Length: 1094
Lines: 32
From: Greg Kroah-Hartman <gregkh@suse.de>
commit 0827a9ff2bbcbb03c33f1a6eb283fe051059482c upstream.
If we can't read the firmware for a device from the disk, and yet the
device already has a valid firmware image in it, we don't want to
replace the firmware with something invalid. So check the version
number to be less than the current one to verify this is the correct
thing to do.
Reported-by: Chris Beauchamp <chris@chillibean.tv>
Tested-by: Chris Beauchamp <chris@chillibean.tv>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/serial/io_ti.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/usb/serial/io_ti.c
+++ b/drivers/usb/serial/io_ti.c
@@ -1156,7 +1156,7 @@ static int download_fw(struct edgeport_s
/* Check if we have an old version in the I2C and
update if necessary */
- if (download_cur_ver != download_new_ver) {
+ if (download_cur_ver < download_new_ver) {
dbg("%s - Update I2C dld from %d.%d to %d.%d",
__func__,
firmware_version->Ver_Major,
prev parent reply other threads:[~2010-08-24 22:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-24 22:46 [0/8] 2.6.27.53-stable review Greg KH
2010-08-24 22:16 ` [1/8] ARM: Tighten check for allowable CPSR values Greg KH
2010-08-24 22:16 ` [2/8] kbuild: fix make incompatibility Greg KH
2010-08-24 22:16 ` [3/8] selinux: use default proc sid on symlinks Greg KH
2010-08-24 22:16 ` [4/8] can: add limit for nframes and clean up signed/unsigned variables Greg KH
2010-08-24 22:16 ` [5/8] fixes for using make 3.82 Greg KH
2010-08-24 22:16 ` [6/8] drm: stop information leak of old kernel stack Greg KH
2010-08-24 22:17 ` [7/8] USB: add device IDs for igotu to navman Greg KH
2010-08-24 22:17 ` Greg KH [this message]
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=20100824221820.752126412@clark.site \
--to=gregkh@suse.de \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=stable-review@kernel.org \
--cc=stable@kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox