* [patch 01/24] softmac: remove netif_tx_disable when scanning
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
@ 2006-12-15 1:33 ` Chris Wright
2006-12-15 1:33 ` [patch 02/24] EBTABLES: Fix wraparounds in ebt_entries verification Chris Wright
` (24 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 1:33 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
torvalds, akpm, alan, Larry Finger, Michael Buesch
[-- Attachment #1: softmac-remove-netif_tx_disable-when-scanning.patch --]
[-- Type: text/plain, Size: 1420 bytes --]
2.6.18-stable review patch. If anyone has any objections, please let us know.
------------------
From: Michael Buesch <mb@bu3sch.de>
In the scan section of ieee80211softmac, network transmits are disabled.
When SoftMAC re-enables transmits, it may override the wishes of a driver
that may have very good reasons for disabling transmits. At least one failure
in bcm43xx can be traced to this problem. In addition, several unexplained
problems may arise from the unexpected enabling of transmits.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
net/ieee80211/softmac/ieee80211softmac_scan.c | 2 --
1 file changed, 2 deletions(-)
--- linux-2.6.18.5.orig/net/ieee80211/softmac/ieee80211softmac_scan.c
+++ linux-2.6.18.5/net/ieee80211/softmac/ieee80211softmac_scan.c
@@ -47,7 +47,6 @@ ieee80211softmac_start_scan(struct ieee8
sm->scanning = 1;
spin_unlock_irqrestore(&sm->lock, flags);
- netif_tx_disable(sm->ieee->dev);
ret = sm->start_scan(sm->dev);
if (ret) {
spin_lock_irqsave(&sm->lock, flags);
@@ -248,7 +247,6 @@ void ieee80211softmac_scan_finished(stru
if (net)
sm->set_channel(sm->dev, net->channel);
}
- netif_wake_queue(sm->ieee->dev);
ieee80211softmac_call_events(sm, IEEE80211SOFTMAC_EVENT_SCAN_FINISHED, NULL);
}
EXPORT_SYMBOL_GPL(ieee80211softmac_scan_finished);
--
^ permalink raw reply [flat|nested] 27+ messages in thread* [patch 02/24] EBTABLES: Fix wraparounds in ebt_entries verification.
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
2006-12-15 1:33 ` [patch 01/24] softmac: remove netif_tx_disable when scanning Chris Wright
@ 2006-12-15 1:33 ` Chris Wright
2006-12-15 1:33 ` [patch 03/24] EBTABLES: Verify that ebt_entries have zero ->distinguisher Chris Wright
` (23 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 1:33 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
torvalds, akpm, alan, David Miller, bunk, Al Viro
[-- Attachment #1: ebtables-fix-wraparounds-in-ebt_entries-verification.patch --]
[-- Type: text/plain, Size: 2478 bytes --]
2.6.18-stable review patch. If anyone has any objections, please let us know.
------------------
From: Al Viro <viro@zeniv.linux.org.uk>
We need to verify that
a) we are not too close to the end of buffer to dereference
b) next entry we'll be checking won't be _before_ our
While we are at it, don't subtract unrelated pointers...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
net/bridge/netfilter/ebtables.c | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
--- linux-2.6.18.5.orig/net/bridge/netfilter/ebtables.c
+++ linux-2.6.18.5/net/bridge/netfilter/ebtables.c
@@ -423,13 +423,17 @@ ebt_check_entry_size_and_hooks(struct eb
struct ebt_entries **hook_entries, unsigned int *n, unsigned int *cnt,
unsigned int *totalcnt, unsigned int *udc_cnt, unsigned int valid_hooks)
{
+ unsigned int offset = (char *)e - newinfo->entries;
+ size_t left = (limit - base) - offset;
int i;
+ if (left < sizeof(unsigned int))
+ goto Esmall;
+
for (i = 0; i < NF_BR_NUMHOOKS; i++) {
if ((valid_hooks & (1 << i)) == 0)
continue;
- if ( (char *)hook_entries[i] - base ==
- (char *)e - newinfo->entries)
+ if ((char *)hook_entries[i] == base + offset)
break;
}
/* beginning of a new chain
@@ -450,11 +454,8 @@ ebt_check_entry_size_and_hooks(struct eb
return -EINVAL;
}
/* before we look at the struct, be sure it is not too big */
- if ((char *)hook_entries[i] + sizeof(struct ebt_entries)
- > limit) {
- BUGPRINT("entries_size too small\n");
- return -EINVAL;
- }
+ if (left < sizeof(struct ebt_entries))
+ goto Esmall;
if (((struct ebt_entries *)e)->policy != EBT_DROP &&
((struct ebt_entries *)e)->policy != EBT_ACCEPT) {
/* only RETURN from udc */
@@ -477,6 +478,8 @@ ebt_check_entry_size_and_hooks(struct eb
return 0;
}
/* a plain old entry, heh */
+ if (left < sizeof(struct ebt_entry))
+ goto Esmall;
if (sizeof(struct ebt_entry) > e->watchers_offset ||
e->watchers_offset > e->target_offset ||
e->target_offset >= e->next_offset) {
@@ -488,10 +491,16 @@ ebt_check_entry_size_and_hooks(struct eb
BUGPRINT("target size too small\n");
return -EINVAL;
}
+ if (left < e->next_offset)
+ goto Esmall;
(*cnt)++;
(*totalcnt)++;
return 0;
+
+Esmall:
+ BUGPRINT("entries_size too small\n");
+ return -EINVAL;
}
struct ebt_cl_stack
--
^ permalink raw reply [flat|nested] 27+ messages in thread* [patch 03/24] EBTABLES: Verify that ebt_entries have zero ->distinguisher.
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
2006-12-15 1:33 ` [patch 01/24] softmac: remove netif_tx_disable when scanning Chris Wright
2006-12-15 1:33 ` [patch 02/24] EBTABLES: Fix wraparounds in ebt_entries verification Chris Wright
@ 2006-12-15 1:33 ` Chris Wright
2006-12-15 1:33 ` [patch 04/24] EBTABLES: Deal with the worst-case behaviour in loop checks Chris Wright
` (22 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 1:33 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
torvalds, akpm, alan, David Miller, bunk, Al Viro
[-- Attachment #1: ebtables-verify-that-ebt_entries-have-zero-distinguisher.patch --]
[-- Type: text/plain, Size: 1999 bytes --]
2.6.18-stable review patch. If anyone has any objections, please let us know.
------------------
From: Al Viro <viro@zeniv.linux.org.uk>
We need that for iterator to work; existing check had been too weak.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
net/bridge/netfilter/ebtables.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
--- linux-2.6.18.5.orig/net/bridge/netfilter/ebtables.c
+++ linux-2.6.18.5/net/bridge/netfilter/ebtables.c
@@ -439,7 +439,7 @@ ebt_check_entry_size_and_hooks(struct eb
/* beginning of a new chain
if i == NF_BR_NUMHOOKS it must be a user defined chain */
if (i != NF_BR_NUMHOOKS || !(e->bitmask & EBT_ENTRY_OR_ENTRIES)) {
- if ((e->bitmask & EBT_ENTRY_OR_ENTRIES) != 0) {
+ if (e->bitmask != 0) {
/* we make userspace set this right,
so there is no misunderstanding */
BUGPRINT("EBT_ENTRY_OR_ENTRIES shouldn't be set "
@@ -522,7 +522,7 @@ ebt_get_udc_positions(struct ebt_entry *
int i;
/* we're only interested in chain starts */
- if (e->bitmask & EBT_ENTRY_OR_ENTRIES)
+ if (e->bitmask)
return 0;
for (i = 0; i < NF_BR_NUMHOOKS; i++) {
if ((valid_hooks & (1 << i)) == 0)
@@ -572,7 +572,7 @@ ebt_cleanup_entry(struct ebt_entry *e, u
{
struct ebt_entry_target *t;
- if ((e->bitmask & EBT_ENTRY_OR_ENTRIES) == 0)
+ if (e->bitmask == 0)
return 0;
/* we're done */
if (cnt && (*cnt)-- == 0)
@@ -598,7 +598,7 @@ ebt_check_entry(struct ebt_entry *e, str
int ret;
/* don't mess with the struct ebt_entries */
- if ((e->bitmask & EBT_ENTRY_OR_ENTRIES) == 0)
+ if (e->bitmask == 0)
return 0;
if (e->bitmask & ~EBT_F_MASK) {
@@ -1316,7 +1316,7 @@ static inline int ebt_make_names(struct
char *hlp;
struct ebt_entry_target *t;
- if ((e->bitmask & EBT_ENTRY_OR_ENTRIES) == 0)
+ if (e->bitmask == 0)
return 0;
hlp = ubase - base + (char *)e + e->target_offset;
--
^ permalink raw reply [flat|nested] 27+ messages in thread* [patch 04/24] EBTABLES: Deal with the worst-case behaviour in loop checks.
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
` (2 preceding siblings ...)
2006-12-15 1:33 ` [patch 03/24] EBTABLES: Verify that ebt_entries have zero ->distinguisher Chris Wright
@ 2006-12-15 1:33 ` Chris Wright
2006-12-15 1:33 ` [patch 05/24] EBTABLES: Prevent wraparounds in checks for entry components sizes Chris Wright
` (21 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 1:33 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
torvalds, akpm, alan, David Miller, bunk, Al Viro
[-- Attachment #1: ebtables-deal-with-the-worst-case-behaviour-in-loop-checks.patch --]
[-- Type: text/plain, Size: 1040 bytes --]
2.6.18-stable review patch. If anyone has any objections, please let us know.
------------------
From: Al Viro <viro@zeniv.linux.org.uk>
No need to revisit a chain we'd already finished with during
the check for current hook. It's either instant loop (which
we'd just detected) or a duplicate work.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
net/bridge/netfilter/ebtables.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- linux-2.6.18.5.orig/net/bridge/netfilter/ebtables.c
+++ linux-2.6.18.5/net/bridge/netfilter/ebtables.c
@@ -739,7 +739,9 @@ static int check_chainloops(struct ebt_e
BUGPRINT("loop\n");
return -1;
}
- /* this can't be 0, so the above test is correct */
+ if (cl_s[i].hookmask & (1 << hooknr))
+ goto letscontinue;
+ /* this can't be 0, so the loop test is correct */
cl_s[i].cs.n = pos + 1;
pos = 0;
cl_s[i].cs.e = ((void *)e + e->next_offset);
--
^ permalink raw reply [flat|nested] 27+ messages in thread* [patch 05/24] EBTABLES: Prevent wraparounds in checks for entry components sizes.
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
` (3 preceding siblings ...)
2006-12-15 1:33 ` [patch 04/24] EBTABLES: Deal with the worst-case behaviour in loop checks Chris Wright
@ 2006-12-15 1:33 ` Chris Wright
2006-12-15 1:33 ` [patch 06/24] NET_SCHED: policer: restore compatibility with old iproute binaries Chris Wright
` (20 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 1:33 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
torvalds, akpm, alan, David Miller, bunk, Al Viro
[-- Attachment #1: ebtables-prevent-wraparounds-in-checks-for-entry-components-sizes.patch --]
[-- Type: text/plain, Size: 2518 bytes --]
2.6.18-stable review patch. If anyone has any objections, please let us know.
------------------
From: Al Viro <viro@zeniv.linux.org.uk>
---
net/bridge/netfilter/ebtables.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
--- linux-2.6.18.5.orig/net/bridge/netfilter/ebtables.c
+++ linux-2.6.18.5/net/bridge/netfilter/ebtables.c
@@ -360,10 +360,11 @@ ebt_check_match(struct ebt_entry_match *
const char *name, unsigned int hookmask, unsigned int *cnt)
{
struct ebt_match *match;
+ size_t left = ((char *)e + e->watchers_offset) - (char *)m;
int ret;
- if (((char *)m) + m->match_size + sizeof(struct ebt_entry_match) >
- ((char *)e) + e->watchers_offset)
+ if (left < sizeof(struct ebt_entry_match) ||
+ left - sizeof(struct ebt_entry_match) < m->match_size)
return -EINVAL;
match = find_match_lock(m->u.name, &ret, &ebt_mutex);
if (!match)
@@ -389,10 +390,11 @@ ebt_check_watcher(struct ebt_entry_watch
const char *name, unsigned int hookmask, unsigned int *cnt)
{
struct ebt_watcher *watcher;
+ size_t left = ((char *)e + e->target_offset) - (char *)w;
int ret;
- if (((char *)w) + w->watcher_size + sizeof(struct ebt_entry_watcher) >
- ((char *)e) + e->target_offset)
+ if (left < sizeof(struct ebt_entry_watcher) ||
+ left - sizeof(struct ebt_entry_watcher) < w->watcher_size)
return -EINVAL;
watcher = find_watcher_lock(w->u.name, &ret, &ebt_mutex);
if (!watcher)
@@ -595,6 +597,7 @@ ebt_check_entry(struct ebt_entry *e, str
struct ebt_entry_target *t;
struct ebt_target *target;
unsigned int i, j, hook = 0, hookmask = 0;
+ size_t gap = e->next_offset - e->target_offset;
int ret;
/* don't mess with the struct ebt_entries */
@@ -656,8 +659,7 @@ ebt_check_entry(struct ebt_entry *e, str
t->u.target = target;
if (t->u.target == &ebt_standard_target) {
- if (e->target_offset + sizeof(struct ebt_standard_target) >
- e->next_offset) {
+ if (gap < sizeof(struct ebt_standard_target)) {
BUGPRINT("Standard target size too big\n");
ret = -EFAULT;
goto cleanup_watchers;
@@ -668,8 +670,7 @@ ebt_check_entry(struct ebt_entry *e, str
ret = -EFAULT;
goto cleanup_watchers;
}
- } else if ((e->target_offset + t->target_size +
- sizeof(struct ebt_entry_target) > e->next_offset) ||
+ } else if (t->target_size > gap - sizeof(struct ebt_entry_target) ||
(t->u.target->check &&
t->u.target->check(name, hookmask, e, t->data, t->target_size) != 0)){
module_put(t->u.target->me);
--
^ permalink raw reply [flat|nested] 27+ messages in thread* [patch 06/24] NET_SCHED: policer: restore compatibility with old iproute binaries
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
` (4 preceding siblings ...)
2006-12-15 1:33 ` [patch 05/24] EBTABLES: Prevent wraparounds in checks for entry components sizes Chris Wright
@ 2006-12-15 1:33 ` Chris Wright
2006-12-15 1:33 ` [patch 07/24] dm crypt: Fix data corruption with dm-crypt over RAID5 Chris Wright
` (19 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 1:33 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
torvalds, akpm, alan, David Miller, bunk, Patrick McHardy,
Jamal Hadi Salim
[-- Attachment #1: net_sched-policer-restore-compatibility-with-old-iproute-binaries.patch --]
[-- Type: text/plain, Size: 2576 bytes --]
2.6.18-stable review patch. If anyone has any objections, please let us know.
------------------
From: Patrick McHardy <kaber@trash.net>
The tc actions increased the size of struct tc_police, which broke
compatibility with old iproute binaries since both the act_police
and the old NET_CLS_POLICE code check for an exact size match.
Since the new members are not even used, the simple fix is to also
accept the size of the old structure. Dumping is not affected since
old userspace will receive a bigger structure, which is handled fine.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
net/sched/act_police.c | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
--- linux-2.6.18.5.orig/net/sched/act_police.c
+++ linux-2.6.18.5/net/sched/act_police.c
@@ -44,6 +44,18 @@ static struct tcf_police *tcf_police_ht[
/* Policer hash table lock */
static DEFINE_RWLOCK(police_lock);
+/* old policer structure from before tc actions */
+struct tc_police_compat
+{
+ u32 index;
+ int action;
+ u32 limit;
+ u32 burst;
+ u32 mtu;
+ struct tc_ratespec rate;
+ struct tc_ratespec peakrate;
+};
+
/* Each policer is serialized by its individual spinlock */
static __inline__ unsigned tcf_police_hash(u32 index)
@@ -169,12 +181,15 @@ static int tcf_act_police_locate(struct
struct tc_police *parm;
struct tcf_police *p;
struct qdisc_rate_table *R_tab = NULL, *P_tab = NULL;
+ int size;
if (rta == NULL || rtattr_parse_nested(tb, TCA_POLICE_MAX, rta) < 0)
return -EINVAL;
- if (tb[TCA_POLICE_TBF-1] == NULL ||
- RTA_PAYLOAD(tb[TCA_POLICE_TBF-1]) != sizeof(*parm))
+ if (tb[TCA_POLICE_TBF-1] == NULL)
+ return -EINVAL;
+ size = RTA_PAYLOAD(tb[TCA_POLICE_TBF-1]);
+ if (size != sizeof(*parm) && size != sizeof(struct tc_police_compat))
return -EINVAL;
parm = RTA_DATA(tb[TCA_POLICE_TBF-1]);
@@ -413,12 +428,15 @@ struct tcf_police * tcf_police_locate(st
struct tcf_police *p;
struct rtattr *tb[TCA_POLICE_MAX];
struct tc_police *parm;
+ int size;
if (rtattr_parse_nested(tb, TCA_POLICE_MAX, rta) < 0)
return NULL;
- if (tb[TCA_POLICE_TBF-1] == NULL ||
- RTA_PAYLOAD(tb[TCA_POLICE_TBF-1]) != sizeof(*parm))
+ if (tb[TCA_POLICE_TBF-1] == NULL)
+ return NULL;
+ size = RTA_PAYLOAD(tb[TCA_POLICE_TBF-1]);
+ if (size != sizeof(*parm) && size != sizeof(struct tc_police_compat))
return NULL;
parm = RTA_DATA(tb[TCA_POLICE_TBF-1]);
--
^ permalink raw reply [flat|nested] 27+ messages in thread* [patch 07/24] dm crypt: Fix data corruption with dm-crypt over RAID5
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
` (5 preceding siblings ...)
2006-12-15 1:33 ` [patch 06/24] NET_SCHED: policer: restore compatibility with old iproute binaries Chris Wright
@ 2006-12-15 1:33 ` Chris Wright
2006-12-15 1:33 ` [patch 08/24] NETFILTER: ip_tables: revision support for compat code Chris Wright
` (18 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 1:33 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
torvalds, akpm, alan, Christophe Saout
[-- Attachment #1: dm-crypt-fix-data-corruption-with-dm-crypt-over-raid5.patch --]
[-- Type: text/plain, Size: 1122 bytes --]
2.6.18-stable review patch. If anyone has any objections, please let us know.
------------------
From: Christophe Saout <christophe@saout.de>
Fix corruption issue with dm-crypt on top of software raid5. Cancelled
readahead bio's that report no error, just have BIO_UPTODATE cleared
were reported as successful reads to the higher layers (and leaving
random content in the buffer cache). Already fixed in 2.6.19.
Signed-off-by: Christophe Saout <christophe@saout.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
drivers/md/dm-crypt.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- linux-2.6.18.5.orig/drivers/md/dm-crypt.c
+++ linux-2.6.18.5/drivers/md/dm-crypt.c
@@ -717,13 +717,15 @@ static int crypt_endio(struct bio *bio,
if (bio->bi_size)
return 1;
+ if (!bio_flagged(bio, BIO_UPTODATE) && !error)
+ error = -EIO;
+
bio_put(bio);
/*
* successful reads are decrypted by the worker thread
*/
- if ((bio_data_dir(bio) == READ)
- && bio_flagged(bio, BIO_UPTODATE)) {
+ if (bio_data_dir(io->bio) == READ && !error) {
kcryptd_queue_io(io);
return 0;
}
--
^ permalink raw reply [flat|nested] 27+ messages in thread* [patch 08/24] NETFILTER: ip_tables: revision support for compat code
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
` (6 preceding siblings ...)
2006-12-15 1:33 ` [patch 07/24] dm crypt: Fix data corruption with dm-crypt over RAID5 Chris Wright
@ 2006-12-15 1:33 ` Chris Wright
2006-12-15 1:33 ` [patch 09/24] PKT_SCHED act_gact: division by zero Chris Wright
` (17 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 1:33 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
torvalds, akpm, alan, David Miller, bunk, Patrick McHardy
[-- Attachment #1: netfilter-ip_tables-revision-support-for-compat-code.patch --]
[-- Type: text/plain, Size: 1171 bytes --]
2.6.18-stable review patch. If anyone has any objections, please let us know.
------------------
From: Patrick McHardy <kaber@trash.net>
---
commit 79030ed07de673e8451a03aecb9ada9f4d75d491
tree 4ba8bd843c8bc95db0ea6877880b73d06da620e5
parent bec71b162747708d4b45b0cd399b484f52f2901a
author Patrick McHardy <kaber@trash.net> Wed, 20 Sep 2006 12:05:08 -0700
committer David S. Miller <davem@sunset.davemloft.net> Fri, 22 Sep 2006 15:20:00 -0700
net/ipv4/netfilter/ip_tables.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- linux-2.6.18.5.orig/net/ipv4/netfilter/ip_tables.c
+++ linux-2.6.18.5/net/ipv4/netfilter/ip_tables.c
@@ -1989,6 +1989,8 @@ compat_get_entries(struct compat_ipt_get
return ret;
}
+static int do_ipt_get_ctl(struct sock *, int, void __user *, int *);
+
static int
compat_do_ipt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
{
@@ -2005,8 +2007,7 @@ compat_do_ipt_get_ctl(struct sock *sk, i
ret = compat_get_entries(user, len);
break;
default:
- duprintf("compat_do_ipt_get_ctl: unknown request %i\n", cmd);
- ret = -EINVAL;
+ ret = do_ipt_get_ctl(sk, cmd, user, len);
}
return ret;
}
--
^ permalink raw reply [flat|nested] 27+ messages in thread* [patch 09/24] PKT_SCHED act_gact: division by zero
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
` (7 preceding siblings ...)
2006-12-15 1:33 ` [patch 08/24] NETFILTER: ip_tables: revision support for compat code Chris Wright
@ 2006-12-15 1:33 ` Chris Wright
2006-12-15 1:33 ` [patch 10/24] SUNHME: Fix for sunhme failures on x86 Chris Wright
` (16 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 1:33 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
torvalds, akpm, alan, David Miller, bunk, Kim Nordlund
[-- Attachment #1: pkt_sched-act_gact-division-by-zero.patch --]
[-- Type: text/plain, Size: 995 bytes --]
2.6.18-stable review patch. If anyone has any objections, please let us know.
------------------
From: David Miller <davem@davemloft.net>
Not returning -EINVAL, because someone might want to use the value
zero in some future gact_prob algorithm?
Signed-off-by: Kim Nordlund <kim.nordlund@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
net/sched/act_gact.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- linux-2.6.18.5.orig/net/sched/act_gact.c
+++ linux-2.6.18.5/net/sched/act_gact.c
@@ -54,14 +54,14 @@ static DEFINE_RWLOCK(gact_lock);
#ifdef CONFIG_GACT_PROB
static int gact_net_rand(struct tcf_gact *p)
{
- if (net_random()%p->pval)
+ if (!p->pval || net_random()%p->pval)
return p->action;
return p->paction;
}
static int gact_determ(struct tcf_gact *p)
{
- if (p->bstats.packets%p->pval)
+ if (!p->pval || p->bstats.packets%p->pval)
return p->action;
return p->paction;
}
--
^ permalink raw reply [flat|nested] 27+ messages in thread* [patch 10/24] SUNHME: Fix for sunhme failures on x86
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
` (8 preceding siblings ...)
2006-12-15 1:33 ` [patch 09/24] PKT_SCHED act_gact: division by zero Chris Wright
@ 2006-12-15 1:33 ` Chris Wright
2006-12-15 1:33 ` [patch 11/24] XFRM: Use output device disable_xfrm for forwarded packets Chris Wright
` (15 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 1:33 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
torvalds, akpm, alan, David Miller, Jurij Smakov
[-- Attachment #1: sunhme-fix-for-sunhme-failures-on-x86.patch --]
[-- Type: text/plain, Size: 1057 bytes --]
2.6.18-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jurij Smakov <jurij@wooyd.org>
The following patch fixes the failure of sunhme drivers on x86 hosts
due to missing pci_enable_device() and pci_set_master() calls, lost
during code refactoring. It has been filed as bugzilla bug #7502 [0]
and Debian bug #397460 [1].
[0] http://bugzilla.kernel.org/show_bug.cgi?id=7502
[1] http://bugs.debian.org/397460
Signed-off-by: Jurij Smakov <jurij@wooyd.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
drivers/net/sunhme.c | 5 +++++
1 file changed, 5 insertions(+)
--- linux-2.6.18.5.orig/drivers/net/sunhme.c
+++ linux-2.6.18.5/drivers/net/sunhme.c
@@ -3012,6 +3012,11 @@ static int __devinit happy_meal_pci_prob
#endif
err = -ENODEV;
+
+ if (pci_enable_device(pdev))
+ goto err_out;
+ pci_set_master(pdev);
+
if (!strcmp(prom_name, "SUNW,qfe") || !strcmp(prom_name, "qfe")) {
qp = quattro_pci_find(pdev);
if (qp == NULL)
--
^ permalink raw reply [flat|nested] 27+ messages in thread* [patch 11/24] XFRM: Use output device disable_xfrm for forwarded packets
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
` (9 preceding siblings ...)
2006-12-15 1:33 ` [patch 10/24] SUNHME: Fix for sunhme failures on x86 Chris Wright
@ 2006-12-15 1:33 ` Chris Wright
2006-12-15 1:33 ` [patch 12/24] dm snapshot: fix freeing pending exception Chris Wright
` (14 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 1:33 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
torvalds, akpm, alan, David Miller, bunk, Patrick McHardy
[-- Attachment #1: xfrm-use-output-device-disable_xfrm-for-forwarded-packets.patch --]
[-- Type: text/plain, Size: 1321 bytes --]
2.6.18-stable review patch. If anyone has any objections, please let us know.
------------------
From: David Miller <davem@davemloft.net>
Currently the behaviour of disable_xfrm is inconsistent between
locally generated and forwarded packets. For locally generated
packets disable_xfrm disables the policy lookup if it is set on
the output device, for forwarded traffic however it looks at the
input device. This makes it impossible to disable xfrm on all
devices but a dummy device and use normal routing to direct
traffic to that device.
Always use the output device when checking disable_xfrm.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
commit 9be2b4e36fb04bbc968693ef95a75acc17cf2931
Author: Patrick McHardy <kaber@trash.net>
Date: Mon Dec 4 19:59:00 2006 -0800
net/ipv4/route.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-2.6.18.5.orig/net/ipv4/route.c
+++ linux-2.6.18.5/net/ipv4/route.c
@@ -1775,7 +1775,7 @@ static inline int __mkroute_input(struct
#endif
if (in_dev->cnf.no_policy)
rth->u.dst.flags |= DST_NOPOLICY;
- if (in_dev->cnf.no_xfrm)
+ if (out_dev->cnf.no_xfrm)
rth->u.dst.flags |= DST_NOXFRM;
rth->fl.fl4_dst = daddr;
rth->rt_dst = daddr;
--
^ permalink raw reply [flat|nested] 27+ messages in thread* [patch 12/24] dm snapshot: fix freeing pending exception
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
` (10 preceding siblings ...)
2006-12-15 1:33 ` [patch 11/24] XFRM: Use output device disable_xfrm for forwarded packets Chris Wright
@ 2006-12-15 1:33 ` Chris Wright
2006-12-15 1:33 ` [patch 13/24] IPSEC: Fix inetpeer leak in ipv4 xfrm dst entries Chris Wright
` (13 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 1:33 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
torvalds, akpm, alan, Milan Broz, device-mapper development,
Alasdair G Kergon
[-- Attachment #1: dm-snapshot-fix-freeing-pending-exception.patch --]
[-- Type: text/plain, Size: 831 bytes --]
2.6.18-stable review patch. If anyone has any objections, please let us know.
------------------
From: Milan Broz <mbroz@redhat.com>
Fix oops when removing full snapshot
kernel bugzilla bug 7040
If a snapshot became invalid (full) while there is outstanding
pending_exception, pending_complete() forgets to remove
the corresponding exception from its exception table before freeing it.
Already fixed in 2.6.19.
Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
drivers/md/dm-snap.c | 1 +
1 file changed, 1 insertion(+)
--- linux-2.6.18.5.orig/drivers/md/dm-snap.c
+++ linux-2.6.18.5/drivers/md/dm-snap.c
@@ -691,6 +691,7 @@ static void pending_complete(struct pend
free_exception(e);
+ remove_exception(&pe->e);
error_snapshot_bios(pe);
goto out;
}
--
^ permalink raw reply [flat|nested] 27+ messages in thread* [patch 13/24] IPSEC: Fix inetpeer leak in ipv4 xfrm dst entries.
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
` (11 preceding siblings ...)
2006-12-15 1:33 ` [patch 12/24] dm snapshot: fix freeing pending exception Chris Wright
@ 2006-12-15 1:33 ` Chris Wright
2006-12-15 1:33 ` [patch 14/24] IrDA: Incorrect TTP header reservation Chris Wright
` (12 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 1:33 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
torvalds, akpm, alan, David Miller, bunk
[-- Attachment #1: ipsec-fix-inetpeer-leak-in-ipv4-xfrm-dst-entries.patch --]
[-- Type: text/plain, Size: 935 bytes --]
2.6.18-stable review patch. If anyone has any objections, please let us know.
------------------
From: David Miller <davem@davemloft.net>
We grab a reference to the route's inetpeer entry but
forget to release it in xfrm4_dst_destroy().
Bug discovered by Kazunori MIYAZAWA <kazunori@miyazawa.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
commit 26db167702756d0022f8ea5f1f30cad3018cfe31
Author: David S. Miller <davem@sunset.davemloft.net>
Date: Wed Dec 6 23:45:15 2006 -0800
net/ipv4/xfrm4_policy.c | 2 ++
1 file changed, 2 insertions(+)
--- linux-2.6.18.5.orig/net/ipv4/xfrm4_policy.c
+++ linux-2.6.18.5/net/ipv4/xfrm4_policy.c
@@ -252,6 +252,8 @@ static void xfrm4_dst_destroy(struct dst
if (likely(xdst->u.rt.idev))
in_dev_put(xdst->u.rt.idev);
+ if (likely(xdst->u.rt.peer))
+ inet_putpeer(xdst->u.rt.peer);
xfrm_dst_destroy(xdst);
}
--
^ permalink raw reply [flat|nested] 27+ messages in thread* [patch 14/24] IrDA: Incorrect TTP header reservation
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
` (12 preceding siblings ...)
2006-12-15 1:33 ` [patch 13/24] IPSEC: Fix inetpeer leak in ipv4 xfrm dst entries Chris Wright
@ 2006-12-15 1:33 ` Chris Wright
2006-12-15 1:33 ` [patch 15/24] bonding: incorrect bonding state reported via ioctl Chris Wright
` (11 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 1:33 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
torvalds, akpm, alan, Samuel Ortiz, David S. Miller,
Jeet Chaudhuri
[-- Attachment #1: irda-incorrect-ttp-header-reservation.patch --]
[-- Type: text/plain, Size: 1169 bytes --]
2.6.18-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jeet Chaudhuri <jeetlinux@yahoo.co.in>
We must reserve SAR + MAX_HEADER bytes for IrLMP to fit in.
This fixes an oops reported (and fixed) by Jeet Chaudhuri, when max_sdu_size
is greater than 0.
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
net/irda/irttp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- linux-2.6.18.5.orig/net/irda/irttp.c
+++ linux-2.6.18.5/net/irda/irttp.c
@@ -1098,7 +1098,7 @@ int irttp_connect_request(struct tsap_cb
return -ENOMEM;
/* Reserve space for MUX_CONTROL and LAP header */
- skb_reserve(tx_skb, TTP_MAX_HEADER);
+ skb_reserve(tx_skb, TTP_MAX_HEADER + TTP_SAR_HEADER);
} else {
tx_skb = userdata;
/*
@@ -1346,7 +1346,7 @@ int irttp_connect_response(struct tsap_c
return -ENOMEM;
/* Reserve space for MUX_CONTROL and LAP header */
- skb_reserve(tx_skb, TTP_MAX_HEADER);
+ skb_reserve(tx_skb, TTP_MAX_HEADER + TTP_SAR_HEADER);
} else {
tx_skb = userdata;
/*
--
^ permalink raw reply [flat|nested] 27+ messages in thread* [patch 15/24] bonding: incorrect bonding state reported via ioctl
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
` (13 preceding siblings ...)
2006-12-15 1:33 ` [patch 14/24] IrDA: Incorrect TTP header reservation Chris Wright
@ 2006-12-15 1:33 ` Chris Wright
2006-12-15 1:33 ` [patch 16/24] DVB: lgdt330x: fix signal / lock status detection bug Chris Wright
` (10 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 1:33 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
torvalds, akpm, alan, Andy Gospodarek, fubar, ctindel,
Jeff Garzik, Stephen Hemminger
[-- Attachment #1: bonding-incorrect-bonding-state-reported-via-ioctl.patch --]
[-- Type: text/plain, Size: 1176 bytes --]
2.6.18-stable review patch. If anyone has any objections, please let us know.
------------------
From: Andy Gospodarek <andy@greyhouse.net>
This is a small fix-up to finish out the work done by Jay Vosburgh to
add carrier-state support for bonding devices. The output in
/proc/net/bonding/bondX was correct, but when collecting the same info
via an iotcl it could still be incorrect.
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
drivers/net/bonding/bond_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-2.6.18.5.orig/drivers/net/bonding/bond_main.c
+++ linux-2.6.18.5/drivers/net/bonding/bond_main.c
@@ -3547,7 +3547,7 @@ static int bond_do_ioctl(struct net_devi
mii->val_out = 0;
read_lock_bh(&bond->lock);
read_lock(&bond->curr_slave_lock);
- if (bond->curr_active_slave) {
+ if (netif_carrier_ok(bond->dev)) {
mii->val_out = BMSR_LSTATUS;
}
read_unlock(&bond->curr_slave_lock);
--
^ permalink raw reply [flat|nested] 27+ messages in thread* [patch 16/24] DVB: lgdt330x: fix signal / lock status detection bug
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
` (14 preceding siblings ...)
2006-12-15 1:33 ` [patch 15/24] bonding: incorrect bonding state reported via ioctl Chris Wright
@ 2006-12-15 1:33 ` Chris Wright
2006-12-15 1:33 ` [patch 17/24] V4L: Fix broken TUNER_LG_NTSC_TAPE radio support Chris Wright
` (9 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 1:33 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
torvalds, akpm, alan, v4l-dvb maintainer list, Adrian Bunk
[-- Attachment #1: dvb-lgdt330x-fix-signal-lock-status-detection-bug.patch --]
[-- Type: text/plain, Size: 1530 bytes --]
2.6.18-stable review patch. If anyone has any objections, please let us know.
------------------
From: Michael Krufky <mkrufky@linuxtv.org>
In some cases when using VSB, the AGC status register has been known to
falsely report "no signal" when in fact there is a carrier lock. The
datasheet labels these status flags as QAM only, yet the lgdt330x
module is using these flags for both QAM and VSB.
This patch allows for the carrier recovery lock status register to be
tested, even if the agc signal status register falsely reports no signal.
Thanks to jcrews from #linuxtv in irc, for initially reporting this bug.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
drivers/media/dvb/frontends/lgdt330x.c | 6 ------
1 file changed, 6 deletions(-)
--- linux-2.6.18.5.orig/drivers/media/dvb/frontends/lgdt330x.c
+++ linux-2.6.18.5/drivers/media/dvb/frontends/lgdt330x.c
@@ -435,9 +435,6 @@ static int lgdt3302_read_status(struct d
/* Test signal does not exist flag */
/* as well as the AGC lock flag. */
*status |= FE_HAS_SIGNAL;
- } else {
- /* Without a signal all other status bits are meaningless */
- return 0;
}
/*
@@ -500,9 +497,6 @@ static int lgdt3303_read_status(struct d
/* Test input signal does not exist flag */
/* as well as the AGC lock flag. */
*status |= FE_HAS_SIGNAL;
- } else {
- /* Without a signal all other status bits are meaningless */
- return 0;
}
/* Carrier Recovery Lock Status Register */
--
^ permalink raw reply [flat|nested] 27+ messages in thread* [patch 17/24] V4L: Fix broken TUNER_LG_NTSC_TAPE radio support
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
` (15 preceding siblings ...)
2006-12-15 1:33 ` [patch 16/24] DVB: lgdt330x: fix signal / lock status detection bug Chris Wright
@ 2006-12-15 1:33 ` Chris Wright
2006-12-15 1:33 ` [patch 18/24] ieee1394: ohci1394: add PPC_PMAC platform code to driver probe Chris Wright
` (8 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 1:33 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
torvalds, akpm, alan, Hans Verkuil, v4l-dvb maintainer list,
Mauro Carvalho Chehab
[-- Attachment #1: v4l-fix-broken-tuner_lg_ntsc_tape-radio-support.patch --]
[-- Type: text/plain, Size: 2582 bytes --]
2.6.18-stable review patch. If anyone has any objections, please let us know.
------------------
From: Hans Verkuil <hverkuil@xs4all.nl>
The TUNER_LG_NTSC_TAPE is identical in all respects to the
TUNER_PHILIPS_FM1236_MK3. So use the params struct for the Philips tuner.
Also add this LG_NTSC_TAPE tuner to the switches where radio specific
parameters are set so it behaves like a TUNER_PHILIPS_FM1236_MK3. This
change fixes the radio support for this tuner (the wrong bandswitch byte
was used).
Thanks to Andy Walls <cwalls@radix.net> for finding this bug.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
drivers/media/video/tuner-simple.c | 2 ++
drivers/media/video/tuner-types.c | 14 ++------------
2 files changed, 4 insertions(+), 12 deletions(-)
--- linux-2.6.18.5.orig/drivers/media/video/tuner-simple.c
+++ linux-2.6.18.5/drivers/media/video/tuner-simple.c
@@ -108,6 +108,7 @@ static int tuner_stereo(struct i2c_clien
case TUNER_PHILIPS_FM1216ME_MK3:
case TUNER_PHILIPS_FM1236_MK3:
case TUNER_PHILIPS_FM1256_IH3:
+ case TUNER_LG_NTSC_TAPE:
stereo = ((status & TUNER_SIGNAL) == TUNER_STEREO_MK3);
break;
default:
@@ -419,6 +420,7 @@ static void default_set_radio_freq(struc
case TUNER_PHILIPS_FM1216ME_MK3:
case TUNER_PHILIPS_FM1236_MK3:
case TUNER_PHILIPS_FMD1216ME_MK3:
+ case TUNER_LG_NTSC_TAPE:
buffer[3] = 0x19;
break;
case TUNER_TNF_5335MF:
--- linux-2.6.18.5.orig/drivers/media/video/tuner-types.c
+++ linux-2.6.18.5/drivers/media/video/tuner-types.c
@@ -671,16 +671,6 @@ static struct tuner_params tuner_panason
},
};
-/* ------------ TUNER_LG_NTSC_TAPE - LGINNOTEK NTSC ------------ */
-
-static struct tuner_params tuner_lg_ntsc_tape_params[] = {
- {
- .type = TUNER_PARAM_TYPE_NTSC,
- .ranges = tuner_fm1236_mk3_ntsc_ranges,
- .count = ARRAY_SIZE(tuner_fm1236_mk3_ntsc_ranges),
- },
-};
-
/* ------------ TUNER_TNF_8831BGFF - Philips PAL ------------ */
static struct tuner_range tuner_tnf_8831bgff_pal_ranges[] = {
@@ -1331,8 +1321,8 @@ struct tunertype tuners[] = {
},
[TUNER_LG_NTSC_TAPE] = { /* LGINNOTEK NTSC */
.name = "LG NTSC (TAPE series)",
- .params = tuner_lg_ntsc_tape_params,
- .count = ARRAY_SIZE(tuner_lg_ntsc_tape_params),
+ .params = tuner_fm1236_mk3_params,
+ .count = ARRAY_SIZE(tuner_fm1236_mk3_params),
},
[TUNER_TNF_8831BGFF] = { /* Philips PAL */
.name = "Tenna TNF 8831 BGFF)",
--
^ permalink raw reply [flat|nested] 27+ messages in thread* [patch 18/24] ieee1394: ohci1394: add PPC_PMAC platform code to driver probe
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
` (16 preceding siblings ...)
2006-12-15 1:33 ` [patch 17/24] V4L: Fix broken TUNER_LG_NTSC_TAPE radio support Chris Wright
@ 2006-12-15 1:33 ` Chris Wright
2006-12-15 1:33 ` [patch 19/24] ARM: Add sys_*at syscalls Chris Wright
` (7 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 1:33 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
torvalds, akpm, alan, Daniel Drake, stefanr
[-- Attachment #1: ieee1394-ohci1394-add-ppc_pmac-platform-code-to-driver-probe.patch --]
[-- Type: text/plain, Size: 2163 bytes --]
2.6.18-stable review patch. If anyone has any objections, please let us know.
------------------
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
Fixes http://bugzilla.kernel.org/show_bug.cgi?id=7431
iBook G3 threw a machine check exception and put the display backlight
to full brightness after ohci1394 was unloaded and reloaded.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
[dsd@gentoo.org: also added missing if condition, commit
63cca59e89892497e95e1e9c7156d3345fb7e2e8]
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
It fixes a kernel oops which occurs when the ohci1394 driver is reloaded on PPC
http://bugs.gentoo.org/154851
drivers/ieee1394/ohci1394.c | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
--- linux-2.6.18.5.orig/drivers/ieee1394/ohci1394.c
+++ linux-2.6.18.5/drivers/ieee1394/ohci1394.c
@@ -3218,6 +3218,19 @@ static int __devinit ohci1394_pci_probe(
struct ti_ohci *ohci; /* shortcut to currently handled device */
resource_size_t ohci_base;
+#ifdef CONFIG_PPC_PMAC
+ /* Necessary on some machines if ohci1394 was loaded/ unloaded before */
+ if (machine_is(powermac)) {
+ struct device_node *of_node = pci_device_to_OF_node(dev);
+
+ if (of_node) {
+ pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, of_node,
+ 0, 1);
+ pmac_call_feature(PMAC_FTR_1394_ENABLE, of_node, 0, 1);
+ }
+ }
+#endif /* CONFIG_PPC_PMAC */
+
if (pci_enable_device(dev))
FAIL(-ENXIO, "Failed to enable OHCI hardware");
pci_set_master(dev);
@@ -3506,11 +3519,9 @@ static void ohci1394_pci_remove(struct p
#endif
#ifdef CONFIG_PPC_PMAC
- /* On UniNorth, power down the cable and turn off the chip
- * clock when the module is removed to save power on
- * laptops. Turning it back ON is done by the arch code when
- * pci_enable_device() is called */
- {
+ /* On UniNorth, power down the cable and turn off the chip clock
+ * to save power on laptops */
+ if (machine_is(powermac)) {
struct device_node* of_node;
of_node = pci_device_to_OF_node(ohci->dev);
--
^ permalink raw reply [flat|nested] 27+ messages in thread* [patch 19/24] ARM: Add sys_*at syscalls
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
` (17 preceding siblings ...)
2006-12-15 1:33 ` [patch 18/24] ieee1394: ohci1394: add PPC_PMAC platform code to driver probe Chris Wright
@ 2006-12-15 1:33 ` Chris Wright
2006-12-15 1:33 ` [patch 20/24] skip data conversion in compat_sys_mount when data_page is NULL Chris Wright
` (6 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 1:33 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
torvalds, akpm, alan, Russell King, Russell King
[-- Attachment #1: arm-add-sys_-at-syscalls.patch --]
[-- Type: text/plain, Size: 2039 bytes --]
2.6.18-stable review patch. If anyone has any objections, please let us know.
------------------
From: Russell King <rmk@arm.linux.org.uk>
Later glibc requires the *at syscalls. Add them.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
arch/arm/kernel/calls.S | 13 +++++++++++++
include/asm-arm/unistd.h | 13 +++++++++++++
2 files changed, 26 insertions(+)
bca0b8e75f6b7cf52cf52c967286b72d84f9b37e
--- linux-2.6.18.5.orig/arch/arm/kernel/calls.S
+++ linux-2.6.18.5/arch/arm/kernel/calls.S
@@ -331,6 +331,19 @@
CALL(sys_mbind)
/* 320 */ CALL(sys_get_mempolicy)
CALL(sys_set_mempolicy)
+ CALL(sys_openat)
+ CALL(sys_mkdirat)
+ CALL(sys_mknodat)
+/* 325 */ CALL(sys_fchownat)
+ CALL(sys_futimesat)
+ CALL(sys_fstatat64)
+ CALL(sys_unlinkat)
+ CALL(sys_renameat)
+/* 330 */ CALL(sys_linkat)
+ CALL(sys_symlinkat)
+ CALL(sys_readlinkat)
+ CALL(sys_fchmodat)
+ CALL(sys_faccessat)
#ifndef syscalls_counted
.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
#define syscalls_counted
--- linux-2.6.18.5.orig/include/asm-arm/unistd.h
+++ linux-2.6.18.5/include/asm-arm/unistd.h
@@ -347,6 +347,19 @@
#define __NR_mbind (__NR_SYSCALL_BASE+319)
#define __NR_get_mempolicy (__NR_SYSCALL_BASE+320)
#define __NR_set_mempolicy (__NR_SYSCALL_BASE+321)
+#define __NR_openat (__NR_SYSCALL_BASE+322)
+#define __NR_mkdirat (__NR_SYSCALL_BASE+323)
+#define __NR_mknodat (__NR_SYSCALL_BASE+324)
+#define __NR_fchownat (__NR_SYSCALL_BASE+325)
+#define __NR_futimesat (__NR_SYSCALL_BASE+326)
+#define __NR_fstatat64 (__NR_SYSCALL_BASE+327)
+#define __NR_unlinkat (__NR_SYSCALL_BASE+328)
+#define __NR_renameat (__NR_SYSCALL_BASE+329)
+#define __NR_linkat (__NR_SYSCALL_BASE+330)
+#define __NR_symlinkat (__NR_SYSCALL_BASE+331)
+#define __NR_readlinkat (__NR_SYSCALL_BASE+332)
+#define __NR_fchmodat (__NR_SYSCALL_BASE+333)
+#define __NR_faccessat (__NR_SYSCALL_BASE+334)
/*
* The following SWIs are ARM private.
--
^ permalink raw reply [flat|nested] 27+ messages in thread* [patch 20/24] skip data conversion in compat_sys_mount when data_page is NULL
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
` (18 preceding siblings ...)
2006-12-15 1:33 ` [patch 19/24] ARM: Add sys_*at syscalls Chris Wright
@ 2006-12-15 1:33 ` Chris Wright
2006-12-15 1:33 ` [patch 21/24] softirq: remove BUG_ONs which can incorrectly trigger Chris Wright
` (5 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 1:33 UTC (permalink / raw)
To: linux-kernel, stable, torvalds
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky, akpm,
alan, amirkin
[-- Attachment #1: skip-data-conversion-in-compat_sys_mount-when-data_page-is-null.patch --]
[-- Type: text/plain, Size: 2789 bytes --]
2.6.18-stable review patch. If anyone has any objections, please let us know.
------------------
From: Andrey Mirkin <amirkin@openvz.org>
OpenVZ Linux kernel team has found a problem with mounting in compat mode.
Simple command "mount -t smbfs ..." on Fedora Core 5 distro in 32-bit mode
leads to oops:
Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP:
[<ffffffff802bc7c6>] compat_sys_mount+0xd6/0x290
PGD 34d48067 PUD 34d03067 PMD 0
Oops: 0000 [1] SMP
CPU: 0
Modules linked in: iptable_nat simfs smbfs ip_nat ip_conntrack vzdquota
parport_pc lp parport 8021q bridge llc vznetdev vzmon nfs lockd sunrpc vzdev
iptable_filter af_packet xt_length ipt_ttl xt_tcpmss ipt_TCPMSS
iptable_mangle xt_limit ipt_tos ipt_REJECT ip_tables x_tables thermal
processor fan button battery asus_acpi ac uhci_hcd ehci_hcd usbcore i2c_i801
i2c_core e100 mii floppy ide_cd cdrom
Pid: 14656, comm: mount
RIP: 0060:[<ffffffff802bc7c6>] [<ffffffff802bc7c6>]
compat_sys_mount+0xd6/0x290
RSP: 0000:ffff810034d31f38 EFLAGS: 00010292
RAX: 000000000000002c RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff810034c86bc0 RSI: 0000000000000096 RDI: ffffffff8061fc90
RBP: ffff810034d31f78 R08: 0000000000000000 R09: 000000000000000d
R10: ffff810034d31e58 R11: 0000000000000001 R12: ffff810039dc3000
R13: 000000000805ea48 R14: 0000000000000000 R15: 00000000c0ed0000
FS: 0000000000000000(0000) GS:ffffffff80749000(0033) knlGS:00000000b7d556b0
CS: 0060 DS: 007b ES: 007b CR0: 000000008005003b
CR2: 0000000000000000 CR3: 0000000034d43000 CR4: 00000000000006e0
Process mount (pid: 14656, veid=300, threadinfo ffff810034d30000, task
ffff810034c86bc0)
Stack: 0000000000000000 ffff810034dd0000 ffff810034e4a000 000000000805ea48
0000000000000000 0000000000000000 0000000000000000 0000000000000000
000000000805ea48 ffffffff8021e64e 0000000000000000 0000000000000000
Call Trace:
[<ffffffff8021e64e>] ia32_sysret+0x0/0xa
Code: 83 3b 06 0f 85 41 01 00 00 0f b7 43 0c 89 43 14 0f b7 43 0a
RIP [<ffffffff802bc7c6>] compat_sys_mount+0xd6/0x290
RSP <ffff810034d31f38>
CR2: 0000000000000000
The problem is that data_page pointer can be NULL, so we should skip data
conversion in this case.
Signed-off-by: Andrey Mirkin <amirkin@openvz.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
fs/compat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-2.6.18.5.orig/fs/compat.c
+++ linux-2.6.18.5/fs/compat.c
@@ -873,7 +873,7 @@ asmlinkage long compat_sys_mount(char __
retval = -EINVAL;
- if (type_page) {
+ if (type_page && data_page) {
if (!strcmp((char *)type_page, SMBFS_NAME)) {
do_smb_super_data_conv((void *)data_page);
} else if (!strcmp((char *)type_page, NCPFS_NAME)) {
--
^ permalink raw reply [flat|nested] 27+ messages in thread* [patch 21/24] softirq: remove BUG_ONs which can incorrectly trigger
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
` (19 preceding siblings ...)
2006-12-15 1:33 ` [patch 20/24] skip data conversion in compat_sys_mount when data_page is NULL Chris Wright
@ 2006-12-15 1:33 ` Chris Wright
2006-12-15 1:33 ` [patch 22/24] m32r: make userspace headers platform-independent Chris Wright
` (4 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 1:33 UTC (permalink / raw)
To: linux-kernel, stable, torvalds
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky, akpm,
alan, zach, mingo, caglar
[-- Attachment #1: softirq-remove-bug_ons-which-can-incorrectly-trigger.patch --]
[-- Type: text/plain, Size: 1833 bytes --]
2.6.18-stable review patch. If anyone has any objections, please let us know.
------------------
From: Zachary Amsden <zach@vmware.com>
It is possible to have tasklets get scheduled before softirqd has had a chance
to spawn on all CPUs. This is totally harmless; after success during action
CPU_UP_PREPARE, action CPU_ONLINE will be called, which immediately wakes
softirqd on the appropriate CPU to process the already pending tasklets. So
there is no danger of having a missed wakeup for any tasklets that were
already pending.
In particular, i386 is affected by this during startup, and is visible when
using a very large initrd; during the time it takes for the initrd to be
decompressed, a timer IRQ can come in and schedule RCU callbacks. It is also
possible that resending of a hardware IRQ via a softirq triggers the same bug.
Because of different timing conditions, this shows up in all emulators and
virtual machines tested, including Xen, VMware, Virtual PC, and Qemu. It is
also possible to trigger on native hardware with a large enough initrd,
although I don't have a reliable case demonstrating that.
Signed-off-by: Zachary Amsden <zach@vmware.com>
Cc: <caglar@pardus.org.tr>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
kernel/softirq.c | 2 --
1 file changed, 2 deletions(-)
--- linux-2.6.18.5.orig/kernel/softirq.c
+++ linux-2.6.18.5/kernel/softirq.c
@@ -574,8 +574,6 @@ static int __cpuinit cpu_callback(struct
switch (action) {
case CPU_UP_PREPARE:
- BUG_ON(per_cpu(tasklet_vec, hotcpu).list);
- BUG_ON(per_cpu(tasklet_hi_vec, hotcpu).list);
p = kthread_create(ksoftirqd, hcpu, "ksoftirqd/%d", hotcpu);
if (IS_ERR(p)) {
printk("ksoftirqd for %i failed\n", hotcpu);
--
^ permalink raw reply [flat|nested] 27+ messages in thread* [patch 22/24] m32r: make userspace headers platform-independent
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
` (20 preceding siblings ...)
2006-12-15 1:33 ` [patch 21/24] softirq: remove BUG_ONs which can incorrectly trigger Chris Wright
@ 2006-12-15 1:33 ` Chris Wright
2006-12-15 1:34 ` [patch 23/24] forcedeth: Disable INTx when enabling MSI in forcedeth Chris Wright
` (3 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 1:33 UTC (permalink / raw)
To: linux-kernel, stable, torvalds
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky, akpm,
alan, takata
[-- Attachment #1: m32r-make-userspace-headers-platform-independent.patch --]
[-- Type: text/plain, Size: 6028 bytes --]
2.6.18-stable review patch. If anyone has any objections, please let us know.
------------------
From: Hirokazu Takata <takata@linux-m32r.org>
The m32r kernel 2.6.18-rc1 or after cause build errors of "unknown isa
configuration" for userspace application programs, such as glibc, gdb, etc.
This is because the recent kernel do not include linux/config.h not to expose
kernel headers for userspace.
To fix the above compile errors, this patch fixes two headers ptrace.h and
sigcontext.h for m32r and makes them platform-independent.
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
arch/m32r/kernel/entry.S | 65 ++++++++++++++++++------------------------
include/asm-m32r/ptrace.h | 28 ++----------------
include/asm-m32r/sigcontext.h | 13 +-------
3 files changed, 35 insertions(+), 71 deletions(-)
--- linux-2.6.18.5.orig/arch/m32r/kernel/entry.S
+++ linux-2.6.18.5/arch/m32r/kernel/entry.S
@@ -23,35 +23,35 @@
* updated in fork.c:copy_thread, signal.c:do_signal,
* ptrace.c and ptrace.h
*
- * M32Rx/M32R2 M32R
- * @(sp) - r4 ditto
- * @(0x04,sp) - r5 ditto
- * @(0x08,sp) - r6 ditto
- * @(0x0c,sp) - *pt_regs ditto
- * @(0x10,sp) - r0 ditto
- * @(0x14,sp) - r1 ditto
- * @(0x18,sp) - r2 ditto
- * @(0x1c,sp) - r3 ditto
- * @(0x20,sp) - r7 ditto
- * @(0x24,sp) - r8 ditto
- * @(0x28,sp) - r9 ditto
- * @(0x2c,sp) - r10 ditto
- * @(0x30,sp) - r11 ditto
- * @(0x34,sp) - r12 ditto
- * @(0x38,sp) - syscall_nr ditto
- * @(0x3c,sp) - acc0h @(0x3c,sp) - acch
- * @(0x40,sp) - acc0l @(0x40,sp) - accl
- * @(0x44,sp) - acc1h @(0x44,sp) - dummy_acc1h
- * @(0x48,sp) - acc1l @(0x48,sp) - dummy_acc1l
- * @(0x4c,sp) - psw ditto
- * @(0x50,sp) - bpc ditto
- * @(0x54,sp) - bbpsw ditto
- * @(0x58,sp) - bbpc ditto
- * @(0x5c,sp) - spu (cr3) ditto
- * @(0x60,sp) - fp (r13) ditto
- * @(0x64,sp) - lr (r14) ditto
- * @(0x68,sp) - spi (cr2) ditto
- * @(0x6c,sp) - orig_r0 ditto
+ * M32R/M32Rx/M32R2
+ * @(sp) - r4
+ * @(0x04,sp) - r5
+ * @(0x08,sp) - r6
+ * @(0x0c,sp) - *pt_regs
+ * @(0x10,sp) - r0
+ * @(0x14,sp) - r1
+ * @(0x18,sp) - r2
+ * @(0x1c,sp) - r3
+ * @(0x20,sp) - r7
+ * @(0x24,sp) - r8
+ * @(0x28,sp) - r9
+ * @(0x2c,sp) - r10
+ * @(0x30,sp) - r11
+ * @(0x34,sp) - r12
+ * @(0x38,sp) - syscall_nr
+ * @(0x3c,sp) - acc0h
+ * @(0x40,sp) - acc0l
+ * @(0x44,sp) - acc1h ; ISA_DSP_LEVEL2 only
+ * @(0x48,sp) - acc1l ; ISA_DSP_LEVEL2 only
+ * @(0x4c,sp) - psw
+ * @(0x50,sp) - bpc
+ * @(0x54,sp) - bbpsw
+ * @(0x58,sp) - bbpc
+ * @(0x5c,sp) - spu (cr3)
+ * @(0x60,sp) - fp (r13)
+ * @(0x64,sp) - lr (r14)
+ * @(0x68,sp) - spi (cr2)
+ * @(0x6c,sp) - orig_r0
*/
#include <linux/linkage.h>
@@ -95,17 +95,10 @@
#define R11(reg) @(0x30,reg)
#define R12(reg) @(0x34,reg)
#define SYSCALL_NR(reg) @(0x38,reg)
-#if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2)
#define ACC0H(reg) @(0x3C,reg)
#define ACC0L(reg) @(0x40,reg)
#define ACC1H(reg) @(0x44,reg)
#define ACC1L(reg) @(0x48,reg)
-#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R)
-#define ACCH(reg) @(0x3C,reg)
-#define ACCL(reg) @(0x40,reg)
-#else
-#error unknown isa configuration
-#endif
#define PSW(reg) @(0x4C,reg)
#define BPC(reg) @(0x50,reg)
#define BBPSW(reg) @(0x54,reg)
--- linux-2.6.18.5.orig/include/asm-m32r/ptrace.h
+++ linux-2.6.18.5/include/asm-m32r/ptrace.h
@@ -33,21 +33,10 @@
#define PT_R15 PT_SP
/* processor status and miscellaneous context registers. */
-#if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2)
#define PT_ACC0H 15
#define PT_ACC0L 16
-#define PT_ACC1H 17
-#define PT_ACC1L 18
-#define PT_ACCH PT_ACC0H
-#define PT_ACCL PT_ACC0L
-#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R)
-#define PT_ACCH 15
-#define PT_ACCL 16
-#define PT_DUMMY_ACC1H 17
-#define PT_DUMMY_ACC1L 18
-#else
-#error unknown isa conifiguration
-#endif
+#define PT_ACC1H 17 /* ISA_DSP_LEVEL2 only */
+#define PT_ACC1L 18 /* ISA_DSP_LEVEL2 only */
#define PT_PSW 19
#define PT_BPC 20
#define PT_BBPSW 21
@@ -103,19 +92,10 @@ struct pt_regs {
long syscall_nr;
/* Saved main processor status and miscellaneous context registers. */
-#if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2)
unsigned long acc0h;
unsigned long acc0l;
- unsigned long acc1h;
- unsigned long acc1l;
-#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R)
- unsigned long acch;
- unsigned long accl;
- unsigned long dummy_acc1h;
- unsigned long dummy_acc1l;
-#else
-#error unknown isa configuration
-#endif
+ unsigned long acc1h; /* ISA_DSP_LEVEL2 only */
+ unsigned long acc1l; /* ISA_DSP_LEVEL2 only */
unsigned long psw;
unsigned long bpc; /* saved PC for TRAP syscalls */
unsigned long bbpsw;
--- linux-2.6.18.5.orig/include/asm-m32r/sigcontext.h
+++ linux-2.6.18.5/include/asm-m32r/sigcontext.h
@@ -23,19 +23,10 @@ struct sigcontext {
unsigned long sc_r12;
/* Saved main processor status and miscellaneous context registers. */
-#if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2)
unsigned long sc_acc0h;
unsigned long sc_acc0l;
- unsigned long sc_acc1h;
- unsigned long sc_acc1l;
-#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R)
- unsigned long sc_acch;
- unsigned long sc_accl;
- unsigned long sc_dummy_acc1h;
- unsigned long sc_dummy_acc1l;
-#else
-#error unknown isa configuration
-#endif
+ unsigned long sc_acc1h; /* ISA_DSP_LEVEL2 only */
+ unsigned long sc_acc1l; /* ISA_DSP_LEVEL2 only */
unsigned long sc_psw;
unsigned long sc_bpc; /* saved PC for TRAP syscalls */
unsigned long sc_bbpsw;
--
^ permalink raw reply [flat|nested] 27+ messages in thread* [patch 23/24] forcedeth: Disable INTx when enabling MSI in forcedeth
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
` (21 preceding siblings ...)
2006-12-15 1:33 ` [patch 22/24] m32r: make userspace headers platform-independent Chris Wright
@ 2006-12-15 1:34 ` Chris Wright
2006-12-15 1:34 ` [patch 24/24] Bluetooth: Add packet size checks for CAPI messages (CVE-2006-6106) Chris Wright
` (2 subsequent siblings)
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 1:34 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
torvalds, akpm, alan, Daniel Barkalow, gregkh, jeff
[-- Attachment #1: forcedeth-disable-intx-when-enabling-msi-in-forcedeth.patch --]
[-- Type: text/plain, Size: 2233 bytes --]
2.6.18-stable review patch. If anyone has any objections, please let us know.
------------------
From: Daniel Barkalow <barkalow@iabervon.org>
At least some nforce cards continue to send legacy interrupts when MSI
is enabled, and these interrupts are treated as unhandled by the
kernel. This patch disables legacy interrupts explicitly when enabling
MSI mode.
The correct fix is to change the MSI infrastructure to disable legacy
interrupts when enabling MSI, but this is potentially risky if the
device isn't PCI-2.3 or is quirky, so the correct fix is going into
mainline, while patches like this one go into -stable.
Legend has it that it is most correct to disable legacy interrupts
before enabling MSI, but the mainline patch does it in the other
order, and this patch is "obviously" the same as mainline.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
The general patch got into mainline last night, and this patch is clearly
the same as that one, limited to the case of forcedeth (the pci_intx()
calls are lifted from {enable,disable}_msi_mode to all of the indirect
callers in forcedeth).
drivers/net/forcedeth.c | 3 +++
1 file changed, 3 insertions(+)
--- linux-2.6.18.5.orig/drivers/net/forcedeth.c
+++ linux-2.6.18.5/drivers/net/forcedeth.c
@@ -2692,11 +2692,13 @@ static int nv_request_irq(struct net_dev
}
if (ret != 0 && np->msi_flags & NV_MSI_CAPABLE) {
if ((ret = pci_enable_msi(np->pci_dev)) == 0) {
+ pci_intx(np->pci_dev, 0);
np->msi_flags |= NV_MSI_ENABLED;
if ((!intr_test && request_irq(np->pci_dev->irq, &nv_nic_irq, IRQF_SHARED, dev->name, dev) != 0) ||
(intr_test && request_irq(np->pci_dev->irq, &nv_nic_irq_test, IRQF_SHARED, dev->name, dev) != 0)) {
printk(KERN_INFO "forcedeth: request_irq failed %d\n", ret);
pci_disable_msi(np->pci_dev);
+ pci_intx(np->pci_dev, 1);
np->msi_flags &= ~NV_MSI_ENABLED;
goto out_err;
}
@@ -2739,6 +2741,7 @@ static void nv_free_irq(struct net_devic
free_irq(np->pci_dev->irq, dev);
if (np->msi_flags & NV_MSI_ENABLED) {
pci_disable_msi(np->pci_dev);
+ pci_intx(np->pci_dev, 1);
np->msi_flags &= ~NV_MSI_ENABLED;
}
}
--
^ permalink raw reply [flat|nested] 27+ messages in thread* [patch 24/24] Bluetooth: Add packet size checks for CAPI messages (CVE-2006-6106)
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
` (22 preceding siblings ...)
2006-12-15 1:34 ` [patch 23/24] forcedeth: Disable INTx when enabling MSI in forcedeth Chris Wright
@ 2006-12-15 1:34 ` Chris Wright
2006-12-15 1:37 ` [patch 00/24] -stable review Chris Wright
2006-12-15 18:20 ` [patch 25/24] x86-64: Mark rdtsc as sync only for netburst, not for core2 Chris Wright
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 1:34 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
torvalds, akpm, alan, Marcel Holtmann, Al Viro, Marcel Holtmann
[-- Attachment #1: bluetooth-add-packet-size-checks-for-capi-messages.patch --]
[-- Type: text/plain, Size: 3498 bytes --]
2.6.18-stable review patch. If anyone has any objections, please let us know.
------------------
From: Marcel Holtmann <holtmann@redhat.com>
With malformed packets it might be possible to overwrite internal
CMTP and CAPI data structures. This patch adds additional length
checks to prevent these kinds of remote attacks.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
net/bluetooth/cmtp/capi.c | 39 +++++++++++++++++++++++++++++++++------
1 file changed, 33 insertions(+), 6 deletions(-)
--- linux-2.6.18.5.orig/net/bluetooth/cmtp/capi.c
+++ linux-2.6.18.5/net/bluetooth/cmtp/capi.c
@@ -196,6 +196,9 @@ static void cmtp_recv_interopmsg(struct
switch (CAPIMSG_SUBCOMMAND(skb->data)) {
case CAPI_CONF:
+ if (skb->len < CAPI_MSG_BASELEN + 10)
+ break;
+
func = CAPIMSG_U16(skb->data, CAPI_MSG_BASELEN + 5);
info = CAPIMSG_U16(skb->data, CAPI_MSG_BASELEN + 8);
@@ -226,6 +229,9 @@ static void cmtp_recv_interopmsg(struct
break;
case CAPI_FUNCTION_GET_PROFILE:
+ if (skb->len < CAPI_MSG_BASELEN + 11 + sizeof(capi_profile))
+ break;
+
controller = CAPIMSG_U16(skb->data, CAPI_MSG_BASELEN + 11);
msgnum = CAPIMSG_MSGID(skb->data);
@@ -246,17 +252,26 @@ static void cmtp_recv_interopmsg(struct
break;
case CAPI_FUNCTION_GET_MANUFACTURER:
+ if (skb->len < CAPI_MSG_BASELEN + 15)
+ break;
+
controller = CAPIMSG_U32(skb->data, CAPI_MSG_BASELEN + 10);
if (!info && ctrl) {
+ int len = min_t(uint, CAPI_MANUFACTURER_LEN,
+ skb->data[CAPI_MSG_BASELEN + 14]);
+
+ memset(ctrl->manu, 0, CAPI_MANUFACTURER_LEN);
strncpy(ctrl->manu,
- skb->data + CAPI_MSG_BASELEN + 15,
- skb->data[CAPI_MSG_BASELEN + 14]);
+ skb->data + CAPI_MSG_BASELEN + 15, len);
}
break;
case CAPI_FUNCTION_GET_VERSION:
+ if (skb->len < CAPI_MSG_BASELEN + 32)
+ break;
+
controller = CAPIMSG_U32(skb->data, CAPI_MSG_BASELEN + 12);
if (!info && ctrl) {
@@ -269,13 +284,18 @@ static void cmtp_recv_interopmsg(struct
break;
case CAPI_FUNCTION_GET_SERIAL_NUMBER:
+ if (skb->len < CAPI_MSG_BASELEN + 17)
+ break;
+
controller = CAPIMSG_U32(skb->data, CAPI_MSG_BASELEN + 12);
if (!info && ctrl) {
+ int len = min_t(uint, CAPI_SERIAL_LEN,
+ skb->data[CAPI_MSG_BASELEN + 16]);
+
memset(ctrl->serial, 0, CAPI_SERIAL_LEN);
strncpy(ctrl->serial,
- skb->data + CAPI_MSG_BASELEN + 17,
- skb->data[CAPI_MSG_BASELEN + 16]);
+ skb->data + CAPI_MSG_BASELEN + 17, len);
}
break;
@@ -284,14 +304,18 @@ static void cmtp_recv_interopmsg(struct
break;
case CAPI_IND:
+ if (skb->len < CAPI_MSG_BASELEN + 6)
+ break;
+
func = CAPIMSG_U16(skb->data, CAPI_MSG_BASELEN + 3);
if (func == CAPI_FUNCTION_LOOPBACK) {
+ int len = min_t(uint, skb->len - CAPI_MSG_BASELEN - 6,
+ skb->data[CAPI_MSG_BASELEN + 5]);
appl = CAPIMSG_APPID(skb->data);
msgnum = CAPIMSG_MSGID(skb->data);
cmtp_send_interopmsg(session, CAPI_RESP, appl, msgnum, func,
- skb->data + CAPI_MSG_BASELEN + 6,
- skb->data[CAPI_MSG_BASELEN + 5]);
+ skb->data + CAPI_MSG_BASELEN + 6, len);
}
break;
@@ -309,6 +333,9 @@ void cmtp_recv_capimsg(struct cmtp_sessi
BT_DBG("session %p skb %p len %d", session, skb, skb->len);
+ if (skb->len < CAPI_MSG_BASELEN)
+ return;
+
if (CAPIMSG_COMMAND(skb->data) == CAPI_INTEROPERABILITY) {
cmtp_recv_interopmsg(session, skb);
return;
--
^ permalink raw reply [flat|nested] 27+ messages in thread* Re: [patch 00/24] -stable review
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
` (23 preceding siblings ...)
2006-12-15 1:34 ` [patch 24/24] Bluetooth: Add packet size checks for CAPI messages (CVE-2006-6106) Chris Wright
@ 2006-12-15 1:37 ` Chris Wright
2006-12-15 18:20 ` [patch 25/24] x86-64: Mark rdtsc as sync only for netburst, not for core2 Chris Wright
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 1:37 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
torvalds, akpm, alan
patch roll-up is available at:
http://www.kernel.org/pub/linux/kernel/people/chrisw/stable/patch-2.6.18.6-rc1.{gz,bz2}
once mirroring has completed.
thanks,
-chris
^ permalink raw reply [flat|nested] 27+ messages in thread* [patch 25/24] x86-64: Mark rdtsc as sync only for netburst, not for core2
2006-12-15 1:33 [patch 00/24] -stable review Chris Wright
` (24 preceding siblings ...)
2006-12-15 1:37 ` [patch 00/24] -stable review Chris Wright
@ 2006-12-15 18:20 ` Chris Wright
25 siblings, 0 replies; 27+ messages in thread
From: Chris Wright @ 2006-12-15 18:20 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Theodore Ts'o, Zwane Mwaikambo, Justin Forbes, torvalds,
Chris Wedgwood, Randy Dunlap, Michael Krufky, Dave Jones,
Chuck Wolber, alan, Arjan van de Ven, Andi Kleen
2.6.18-stable review patch. If anyone has any objections, please let us know.
------------------
From: Arjan van de Ven <arjan@linux.intel.com>
On the Core2 cpus, the rdtsc instruction is not serializing (as defined
in the architecture reference since rdtsc exists) and due to the deep
speculation of these cores, it's possible that you can observe time go
backwards between cores due to this speculation. Since the kernel
already deals with this with the SYNC_RDTSC flag, the solution is
simple, only assume that the instruction is serializing on family 15...
The price one pays for this is a slightly slower gettimeofday (by a
dozen or two cycles), but that increase is quite small to pay for a
really-going-forward tsc counter.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
[chrisw: backported to 2.6.18]
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
Commit: f3d73707a1e84f0687a05144b70b660441e999c7
Author: Arjan van de Ven <arjan@linux.intel.com>
Date: Thu Dec 7 02:14:12 2006 +0100
arch/x86_64/kernel/setup.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- linux-2.6.18.5.orig/arch/x86_64/kernel/setup.c
+++ linux-2.6.18.5/arch/x86_64/kernel/setup.c
@@ -1010,7 +1010,10 @@ static void __cpuinit init_intel(struct
if ((c->x86 == 0xf && c->x86_model >= 0x03) ||
(c->x86 == 0x6 && c->x86_model >= 0x0e))
set_bit(X86_FEATURE_CONSTANT_TSC, &c->x86_capability);
- set_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability);
+ if (c->x86 == 15)
+ set_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability);
+ else
+ clear_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability);
c->x86_max_cores = intel_num_cpu_cores(c);
srat_detect_node();
^ permalink raw reply [flat|nested] 27+ messages in thread