* [patch 01/58] forcedeth: Fix resume from hibernation regression.
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 02/58] mac80211: Fix bug in getting rx status for frames pending in reorder buffer Greg KH
` (58 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Ed Swierk, David S. Miller, Tvrtko Ursulin, Chris Wright
[-- Attachment #1: forcedeth-fix-resume-from-hibernation-regression.patch --]
[-- Type: text/plain, Size: 958 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Ed Swierk <eswierk@aristanetworks.com>
upstream commit: 35a7433c789ba6df6d96b70fa745ae9e6cac0038
Reset phy state on resume, fixing a regression caused by powering down
the phy on hibernate.
Signed-off-by: Ed Swierk <eswierk@aristanetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Tvrtko Ursulin <tvrtko.ursulin@sophos.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
drivers/net/forcedeth.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -5995,6 +5995,9 @@ static int nv_resume(struct pci_dev *pde
for (i = 0;i <= np->register_size/sizeof(u32); i++)
writel(np->saved_config_space[i], base+i*sizeof(u32));
+ /* restore phy state, including autoneg */
+ phy_init(dev);
+
netif_device_attach(dev);
if (netif_running(dev)) {
rc = nv_open(dev);
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 02/58] mac80211: Fix bug in getting rx status for frames pending in reorder buffer
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
2009-05-06 21:45 ` [patch 01/58] forcedeth: Fix resume from hibernation regression Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 03/58] b43: Poison RX buffers Greg KH
` (57 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 UTC (permalink / raw)
To: linux-kernel, stable, jejb
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Vasanthakumar Thiagarajan, Johannes Berg, John W. Linville,
Chris Wright
[-- Attachment #1: mac80211-fix-bug-in-getting-rx-status-for-frames-pending-in-reorder-buffer.patch --]
[-- Type: text/plain, Size: 3477 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Vasanthakumar Thiagarajan <vasanth@atheros.com>
upstream commit: b3631286aca3f54427ca0eb950981e9753866f6c
Currently rx status for frames which are completed from reorder buffer
is taken from it's cb area which is not always right, cb is not holding
the rx status when driver uses mac80211's non-irq rx handler to pass it's
received frames. This results in dropping almost all frames from reorder
buffer when security is enabled by doing double decryption (first in hw,
second in sw because of wrong rx status). This patch copies rx status into
cb area before the frame is put into reorder buffer. After this patch,
there is a significant improvement in throughput with ath9k + WPA2(AES).
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
net/mac80211/rx.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -29,6 +29,7 @@
static u8 ieee80211_sta_manage_reorder_buf(struct ieee80211_hw *hw,
struct tid_ampdu_rx *tid_agg_rx,
struct sk_buff *skb,
+ struct ieee80211_rx_status *status,
u16 mpdu_seq_num,
int bar_req);
/*
@@ -1538,7 +1539,7 @@ ieee80211_rx_h_ctrl(struct ieee80211_rx_
/* manage reordering buffer according to requested */
/* sequence number */
rcu_read_lock();
- ieee80211_sta_manage_reorder_buf(hw, tid_agg_rx, NULL,
+ ieee80211_sta_manage_reorder_buf(hw, tid_agg_rx, NULL, NULL,
start_seq_num, 1);
rcu_read_unlock();
return RX_DROP_UNUSABLE;
@@ -2034,6 +2035,7 @@ static inline u16 seq_sub(u16 sq1, u16 s
static u8 ieee80211_sta_manage_reorder_buf(struct ieee80211_hw *hw,
struct tid_ampdu_rx *tid_agg_rx,
struct sk_buff *skb,
+ struct ieee80211_rx_status *rxstatus,
u16 mpdu_seq_num,
int bar_req)
{
@@ -2115,6 +2117,8 @@ static u8 ieee80211_sta_manage_reorder_b
/* put the frame in the reordering buffer */
tid_agg_rx->reorder_buf[index] = skb;
+ memcpy(tid_agg_rx->reorder_buf[index]->cb, rxstatus,
+ sizeof(*rxstatus));
tid_agg_rx->stored_mpdu_num++;
/* release the buffer until next missing frame */
index = seq_sub(tid_agg_rx->head_seq_num, tid_agg_rx->ssn)
@@ -2140,7 +2144,8 @@ static u8 ieee80211_sta_manage_reorder_b
}
static u8 ieee80211_rx_reorder_ampdu(struct ieee80211_local *local,
- struct sk_buff *skb)
+ struct sk_buff *skb,
+ struct ieee80211_rx_status *status)
{
struct ieee80211_hw *hw = &local->hw;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
@@ -2191,7 +2196,7 @@ static u8 ieee80211_rx_reorder_ampdu(str
/* according to mpdu sequence number deal with reordering buffer */
mpdu_seq_num = (sc & IEEE80211_SCTL_SEQ) >> 4;
- ret = ieee80211_sta_manage_reorder_buf(hw, tid_agg_rx, skb,
+ ret = ieee80211_sta_manage_reorder_buf(hw, tid_agg_rx, skb, status,
mpdu_seq_num, 0);
end_reorder:
return ret;
@@ -2255,7 +2260,7 @@ void __ieee80211_rx(struct ieee80211_hw
return;
}
- if (!ieee80211_rx_reorder_ampdu(local, skb))
+ if (!ieee80211_rx_reorder_ampdu(local, skb, status))
__ieee80211_rx_handle_packet(hw, skb, status, rate);
rcu_read_unlock();
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 03/58] b43: Poison RX buffers
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
2009-05-06 21:45 ` [patch 01/58] forcedeth: Fix resume from hibernation regression Greg KH
2009-05-06 21:45 ` [patch 02/58] mac80211: Fix bug in getting rx status for frames pending in reorder buffer Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 04/58] b43: Refresh RX poison on buffer recycling Greg KH
` (56 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 UTC (permalink / raw)
To: linux-kernel, stable, jejb
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Michael Buesch, John W. Linville, Chris Wright
[-- Attachment #1: b43-poison-rx-buffers.patch --]
[-- Type: text/plain, Size: 4144 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Michael Buesch <mb@bu3sch.de>
upstream commit: ec9a1d8c13e36440eda0f3c79b8149080e3ab5ba
This patch adds poisoning and sanity checking to the RX DMA buffers.
This is used for protection against buggy hardware/firmware that raises
RX interrupts without doing an actual DMA transfer.
This mechanism protects against rare "bad packets" (due to uninitialized skb data)
and rare kernel crashes due to uninitialized RX headers.
The poison is selected to not match on valid frames and to be cheap for checking.
The poison check mechanism _might_ trigger incorrectly, if we are voluntarily
receiving frames with bad PLCP headers. However, this is nonfatal, because the
chance of such a match is basically zero and in case it happens it just results
in dropping the packet.
Bad-PLCP RX defaults to off, and you should leave it off unless you want to listen
to the latest news broadcasted by your microwave oven.
This patch also moves the initialization of the RX-header "length" field in front of
the mapping of the DMA buffer. The CPU should not touch the buffer after we mapped it.
Cc: stable@kernel.org
Reported-by: Francesco Gringoli <francesco.gringoli@ing.unibs.it>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
drivers/net/wireless/b43/dma.c | 37 +++++++++++++++++++++++++++++++++----
1 file changed, 33 insertions(+), 4 deletions(-)
--- a/drivers/net/wireless/b43/dma.c
+++ b/drivers/net/wireless/b43/dma.c
@@ -551,11 +551,32 @@ address_error:
return 1;
}
+static bool b43_rx_buffer_is_poisoned(struct b43_dmaring *ring, struct sk_buff *skb)
+{
+ unsigned char *f = skb->data + ring->frameoffset;
+
+ return ((f[0] & f[1] & f[2] & f[3] & f[4] & f[5] & f[6] & f[7]) == 0xFF);
+}
+
+static void b43_poison_rx_buffer(struct b43_dmaring *ring, struct sk_buff *skb)
+{
+ struct b43_rxhdr_fw4 *rxhdr;
+ unsigned char *frame;
+
+ /* This poisons the RX buffer to detect DMA failures. */
+
+ rxhdr = (struct b43_rxhdr_fw4 *)(skb->data);
+ rxhdr->frame_len = 0;
+
+ B43_WARN_ON(ring->rx_buffersize < ring->frameoffset + sizeof(struct b43_plcp_hdr6) + 2);
+ frame = skb->data + ring->frameoffset;
+ memset(frame, 0xFF, sizeof(struct b43_plcp_hdr6) + 2 /* padding */);
+}
+
static int setup_rx_descbuffer(struct b43_dmaring *ring,
struct b43_dmadesc_generic *desc,
struct b43_dmadesc_meta *meta, gfp_t gfp_flags)
{
- struct b43_rxhdr_fw4 *rxhdr;
dma_addr_t dmaaddr;
struct sk_buff *skb;
@@ -564,6 +585,7 @@ static int setup_rx_descbuffer(struct b4
skb = __dev_alloc_skb(ring->rx_buffersize, gfp_flags);
if (unlikely(!skb))
return -ENOMEM;
+ b43_poison_rx_buffer(ring, skb);
dmaaddr = map_descbuffer(ring, skb->data, ring->rx_buffersize, 0);
if (b43_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize, 0)) {
/* ugh. try to realloc in zone_dma */
@@ -574,6 +596,7 @@ static int setup_rx_descbuffer(struct b4
skb = __dev_alloc_skb(ring->rx_buffersize, gfp_flags);
if (unlikely(!skb))
return -ENOMEM;
+ b43_poison_rx_buffer(ring, skb);
dmaaddr = map_descbuffer(ring, skb->data,
ring->rx_buffersize, 0);
}
@@ -589,9 +612,6 @@ static int setup_rx_descbuffer(struct b4
ring->ops->fill_descriptor(ring, desc, dmaaddr,
ring->rx_buffersize, 0, 0, 0);
- rxhdr = (struct b43_rxhdr_fw4 *)(skb->data);
- rxhdr->frame_len = 0;
-
return 0;
}
@@ -1482,6 +1502,15 @@ static void dma_rx(struct b43_dmaring *r
goto drop;
}
}
+ if (unlikely(b43_rx_buffer_is_poisoned(ring, skb))) {
+ /* Something went wrong with the DMA.
+ * The device did not touch the buffer and did not overwrite the poison. */
+ b43dbg(ring->dev->wl, "DMA RX: Dropping poisoned buffer.\n");
+ /* recycle the descriptor buffer. */
+ sync_descbuffer_for_device(ring, meta->dmaaddr,
+ ring->rx_buffersize);
+ goto drop;
+ }
if (unlikely(len > ring->rx_buffersize)) {
/* The data did not fit into one descriptor buffer
* and is split over multiple buffers.
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 04/58] b43: Refresh RX poison on buffer recycling
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (2 preceding siblings ...)
2009-05-06 21:45 ` [patch 03/58] b43: Poison RX buffers Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 05/58] thinkpad-acpi: fix LED blinking through timer trigger Greg KH
` (55 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 UTC (permalink / raw)
To: linux-kernel, stable, jejb
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Francesco Gringoli, Michael Buesch, John W. Linville,
Chris Wright
[-- Attachment #1: b43-refresh-rx-poison-on-buffer-recycling.patch --]
[-- Type: text/plain, Size: 2720 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Michael Buesch <mb@bu3sch.de>
upstream commit: cf68636a9773aa97915497fe54fa4a51e3f08f3a
The RX buffer poison needs to be refreshed, if we recycle an RX buffer,
because it might be (partially) overwritten by some DMA operations.
Cc: stable@kernel.org
Cc: Francesco Gringoli <francesco.gringoli@ing.unibs.it>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
drivers/net/wireless/b43/dma.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
--- a/drivers/net/wireless/b43/dma.c
+++ b/drivers/net/wireless/b43/dma.c
@@ -1496,20 +1496,16 @@ static void dma_rx(struct b43_dmaring *r
len = le16_to_cpu(rxhdr->frame_len);
} while (len == 0 && i++ < 5);
if (unlikely(len == 0)) {
- /* recycle the descriptor buffer. */
- sync_descbuffer_for_device(ring, meta->dmaaddr,
- ring->rx_buffersize);
- goto drop;
+ dmaaddr = meta->dmaaddr;
+ goto drop_recycle_buffer;
}
}
if (unlikely(b43_rx_buffer_is_poisoned(ring, skb))) {
/* Something went wrong with the DMA.
* The device did not touch the buffer and did not overwrite the poison. */
b43dbg(ring->dev->wl, "DMA RX: Dropping poisoned buffer.\n");
- /* recycle the descriptor buffer. */
- sync_descbuffer_for_device(ring, meta->dmaaddr,
- ring->rx_buffersize);
- goto drop;
+ dmaaddr = meta->dmaaddr;
+ goto drop_recycle_buffer;
}
if (unlikely(len > ring->rx_buffersize)) {
/* The data did not fit into one descriptor buffer
@@ -1523,6 +1519,7 @@ static void dma_rx(struct b43_dmaring *r
while (1) {
desc = ops->idx2desc(ring, *slot, &meta);
/* recycle the descriptor buffer. */
+ b43_poison_rx_buffer(ring, meta->skb);
sync_descbuffer_for_device(ring, meta->dmaaddr,
ring->rx_buffersize);
*slot = next_slot(ring, *slot);
@@ -1541,8 +1538,7 @@ static void dma_rx(struct b43_dmaring *r
err = setup_rx_descbuffer(ring, desc, meta, GFP_ATOMIC);
if (unlikely(err)) {
b43dbg(ring->dev->wl, "DMA RX: setup_rx_descbuffer() failed\n");
- sync_descbuffer_for_device(ring, dmaaddr, ring->rx_buffersize);
- goto drop;
+ goto drop_recycle_buffer;
}
unmap_descbuffer(ring, dmaaddr, ring->rx_buffersize, 0);
@@ -1552,6 +1548,11 @@ static void dma_rx(struct b43_dmaring *r
b43_rx(ring->dev, skb, rxhdr);
drop:
return;
+
+drop_recycle_buffer:
+ /* Poison and recycle the RX buffer. */
+ b43_poison_rx_buffer(ring, skb);
+ sync_descbuffer_for_device(ring, dmaaddr, ring->rx_buffersize);
}
void b43_dma_rx(struct b43_dmaring *ring)
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 05/58] thinkpad-acpi: fix LED blinking through timer trigger
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (3 preceding siblings ...)
2009-05-06 21:45 ` [patch 04/58] b43: Refresh RX poison on buffer recycling Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 06/58] ALSA: us122l: add snd_us122l_free() Greg KH
` (54 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 UTC (permalink / raw)
To: linux-kernel, stable, jejb
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Henrique de Moraes Holschuh, Len Brown, Chris Wright
[-- Attachment #1: thinkpad-acpi-fix-led-blinking-through-timer-trigger.patch --]
[-- Type: text/plain, Size: 3941 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
upstream commit: 75bd3bf2ade9d548be0d2bde60b5ee0fdce0b127
The set_blink hook code in the LED subdriver would never manage to get
a LED to blink, and instead it would just turn it on. The consequence
of this is that the "timer" trigger would not cause the LED to blink
if given default parameters.
This problem exists since 2.6.26-rc1.
To fix it, switch the deferred LED work handling to use the
thinkpad-acpi-specific LED status (off/on/blink) directly.
This also makes the code easier to read, and to extend later.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: stable@kernel.org
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
drivers/platform/x86/thinkpad_acpi.c | 41 ++++++++++++++++-------------------
1 file changed, 19 insertions(+), 22 deletions(-)
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -306,11 +306,17 @@ static u32 dbg_level;
static struct workqueue_struct *tpacpi_wq;
+enum led_status_t {
+ TPACPI_LED_OFF = 0,
+ TPACPI_LED_ON,
+ TPACPI_LED_BLINK,
+};
+
/* Special LED class that can defer work */
struct tpacpi_led_classdev {
struct led_classdev led_classdev;
struct work_struct work;
- enum led_brightness new_brightness;
+ enum led_status_t new_state;
unsigned int led;
};
@@ -4057,7 +4063,7 @@ static void light_set_status_worker(stru
container_of(work, struct tpacpi_led_classdev, work);
if (likely(tpacpi_lifecycle == TPACPI_LIFE_RUNNING))
- light_set_status((data->new_brightness != LED_OFF));
+ light_set_status((data->new_state != TPACPI_LED_OFF));
}
static void light_sysfs_set(struct led_classdev *led_cdev,
@@ -4067,7 +4073,8 @@ static void light_sysfs_set(struct led_c
container_of(led_cdev,
struct tpacpi_led_classdev,
led_classdev);
- data->new_brightness = brightness;
+ data->new_state = (brightness != LED_OFF) ?
+ TPACPI_LED_ON : TPACPI_LED_OFF;
queue_work(tpacpi_wq, &data->work);
}
@@ -4574,12 +4581,6 @@ enum { /* For TPACPI_LED_OLD */
TPACPI_LED_EC_HLMS = 0x0e, /* EC reg to select led to command */
};
-enum led_status_t {
- TPACPI_LED_OFF = 0,
- TPACPI_LED_ON,
- TPACPI_LED_BLINK,
-};
-
static enum led_access_mode led_supported;
TPACPI_HANDLE(led, ec, "SLED", /* 570 */
@@ -4673,23 +4674,13 @@ static int led_set_status(const unsigned
return rc;
}
-static void led_sysfs_set_status(unsigned int led,
- enum led_brightness brightness)
-{
- led_set_status(led,
- (brightness == LED_OFF) ?
- TPACPI_LED_OFF :
- (tpacpi_led_state_cache[led] == TPACPI_LED_BLINK) ?
- TPACPI_LED_BLINK : TPACPI_LED_ON);
-}
-
static void led_set_status_worker(struct work_struct *work)
{
struct tpacpi_led_classdev *data =
container_of(work, struct tpacpi_led_classdev, work);
if (likely(tpacpi_lifecycle == TPACPI_LIFE_RUNNING))
- led_sysfs_set_status(data->led, data->new_brightness);
+ led_set_status(data->led, data->new_state);
}
static void led_sysfs_set(struct led_classdev *led_cdev,
@@ -4698,7 +4689,13 @@ static void led_sysfs_set(struct led_cla
struct tpacpi_led_classdev *data = container_of(led_cdev,
struct tpacpi_led_classdev, led_classdev);
- data->new_brightness = brightness;
+ if (brightness == LED_OFF)
+ data->new_state = TPACPI_LED_OFF;
+ else if (tpacpi_led_state_cache[data->led] != TPACPI_LED_BLINK)
+ data->new_state = TPACPI_LED_ON;
+ else
+ data->new_state = TPACPI_LED_BLINK;
+
queue_work(tpacpi_wq, &data->work);
}
@@ -4716,7 +4713,7 @@ static int led_sysfs_blink_set(struct le
} else if ((*delay_on != 500) || (*delay_off != 500))
return -EINVAL;
- data->new_brightness = TPACPI_LED_BLINK;
+ data->new_state = TPACPI_LED_BLINK;
queue_work(tpacpi_wq, &data->work);
return 0;
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 06/58] ALSA: us122l: add snd_us122l_free()
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (4 preceding siblings ...)
2009-05-06 21:45 ` [patch 05/58] thinkpad-acpi: fix LED blinking through timer trigger Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 07/58] mac80211: fix basic rate bitmap calculation Greg KH
` (53 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 UTC (permalink / raw)
To: linux-kernel, stable, jejb
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Karsten Wiese, Takashi Iwai, Chris Wright
[-- Attachment #1: alsa-us122l-add-snd_us122l_free.patch --]
[-- Type: text/plain, Size: 1858 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Karsten Wiese <fzu@wemgehoertderstaat.de>
upstream commit: 5d4af1be06affa2b42cdf59cd376752be1f934b3
Use it to clean up snd_us122l_card_used[].
Without patch unplugging of an US122L soundcard didn't reset the
corresponding element of snd_us122l_card_used[] to 0.
The (SNDRV_CARDS + 1)th plugging in did not result in creating the soundcard
device anymore.
Index values supplied with the modprobe command line were not used correctly
anymore after the first unplugging of an US122L.
Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
[chrisw: backport to 2.6.29]
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
sound/usb/usx2y/us122l.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
--- a/sound/usb/usx2y/us122l.c
+++ b/sound/usb/usx2y/us122l.c
@@ -478,6 +478,14 @@ static bool us122l_create_card(struct sn
return true;
}
+static void snd_us122l_free(struct snd_card *card)
+{
+ struct us122l *us122l = US122L(card);
+ int index = us122l->chip.index;
+ if (index >= 0 && index < SNDRV_CARDS)
+ snd_us122l_card_used[index] = 0;
+}
+
static struct snd_card *usx2y_create_card(struct usb_device *device)
{
int dev;
@@ -492,7 +500,7 @@ static struct snd_card *usx2y_create_car
if (!card)
return NULL;
snd_us122l_card_used[US122L(card)->chip.index = dev] = 1;
-
+ card->private_free = snd_us122l_free;
US122L(card)->chip.dev = device;
US122L(card)->chip.card = card;
mutex_init(&US122L(card)->mutex);
@@ -575,7 +583,7 @@ static void snd_us122l_disconnect(struct
}
usb_put_intf(intf);
- usb_put_dev(US122L(card)->chip.dev);
+ usb_put_dev(us122l->chip.dev);
while (atomic_read(&us122l->mmap_count))
msleep(500);
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 07/58] mac80211: fix basic rate bitmap calculation
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (5 preceding siblings ...)
2009-05-06 21:45 ` [patch 06/58] ALSA: us122l: add snd_us122l_free() Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 08/58] KVM: MMU: Fix off-by-one calculating large page count Greg KH
` (52 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 UTC (permalink / raw)
To: linux-kernel, stable, jejb
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Johannes Berg, John W. Linville, Chris Wright
[-- Attachment #1: mac80211-fix-basic-rate-bitmap-calculation.patch --]
[-- Type: text/plain, Size: 1081 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Johannes Berg <johannes@sipsolutions.net>
upstream commit: 7e0986c17f695952ce5d61ed793ce048ba90a661
"mac80211: fix basic rates setting from association response"
introduced a copy/paste error.
Unfortunately, this not just leads to wrong data being passed
to the driver but is remotely exploitable for some hardware or
driver combinations.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
net/mac80211/mlme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1342,7 +1342,7 @@ static void ieee80211_rx_mgmt_assoc_resp
for (i = 0; i < elems.ext_supp_rates_len; i++) {
int rate = (elems.ext_supp_rates[i] & 0x7f) * 5;
- bool is_basic = !!(elems.supp_rates[i] & 0x80);
+ bool is_basic = !!(elems.ext_supp_rates[i] & 0x80);
if (rate > 110)
have_higher_than_11mbit = true;
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 08/58] KVM: MMU: Fix off-by-one calculating large page count
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (6 preceding siblings ...)
2009-05-06 21:45 ` [patch 07/58] mac80211: fix basic rate bitmap calculation Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 09/58] KVM: MMU: disable global page optimization Greg KH
` (51 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 UTC (permalink / raw)
To: linux-kernel, stable, jejb
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Avi Kivity, Chris Wright
[-- Attachment #1: kvm-mmu-fix-off-by-one-calculating-large-page-count.patch --]
[-- Type: text/plain, Size: 1415 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Avi Kivity <avi@redhat.com>
upstream commit: 99894a799f09cf9e28296bb16e75bd5830fd2c4e
The large page initialization code concludes there are two large pages spanned
by a slot covering 1 (small) page starting at gfn 1. This is incorrect, and
also results in incorrect write_count initialization in some cases (base = 1,
npages = 513 for example).
Cc: stable@kernel.org
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
virt/kvm/kvm_main.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -964,6 +964,7 @@ int __kvm_set_memory_region(struct kvm *
int r;
gfn_t base_gfn;
unsigned long npages;
+ int largepages;
unsigned long i;
struct kvm_memory_slot *memslot;
struct kvm_memory_slot old, new;
@@ -1039,11 +1040,8 @@ int __kvm_set_memory_region(struct kvm *
new.userspace_addr = 0;
}
if (npages && !new.lpage_info) {
- int largepages = npages / KVM_PAGES_PER_HPAGE;
- if (npages % KVM_PAGES_PER_HPAGE)
- largepages++;
- if (base_gfn % KVM_PAGES_PER_HPAGE)
- largepages++;
+ largepages = 1 + (base_gfn + npages - 1) / KVM_PAGES_PER_HPAGE;
+ largepages -= base_gfn / KVM_PAGES_PER_HPAGE;
new.lpage_info = vmalloc(largepages * sizeof(*new.lpage_info));
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 09/58] KVM: MMU: disable global page optimization
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (7 preceding siblings ...)
2009-05-06 21:45 ` [patch 08/58] KVM: MMU: Fix off-by-one calculating large page count Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 10/58] KVM: Fix overlapping check for memory slots Greg KH
` (50 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 UTC (permalink / raw)
To: linux-kernel, stable, Chris Wright
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Marcelo Tosatti, Avi Kivity, Chris Wright
[-- Attachment #1: kvm-mmu-disable-global-page-optimization.patch --]
[-- Type: text/plain, Size: 986 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Marcelo Tosatti <mtosatti@redhat.com>
upstream commit: bf47a760f66add7870fba33ab50f58b550d6bbd1
Complexity to fix it not worthwhile the gains, as discussed
in http://article.gmane.org/gmane.comp.emulators.kvm.devel/28649.
Cc: stable@kernel.org
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
[mtosatti: backport to 2.6.29]
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
arch/x86/kvm/mmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -797,7 +797,7 @@ static struct kvm_mmu_page *kvm_mmu_allo
ASSERT(is_empty_shadow_page(sp->spt));
bitmap_zero(sp->slot_bitmap, KVM_MEMORY_SLOTS + KVM_PRIVATE_MEM_SLOTS);
sp->multimapped = 0;
- sp->global = 1;
+ sp->global = 0;
sp->parent_pte = parent_pte;
--vcpu->kvm->arch.n_free_mmu_pages;
return sp;
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 10/58] KVM: Fix overlapping check for memory slots
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (8 preceding siblings ...)
2009-05-06 21:45 ` [patch 09/58] KVM: MMU: disable global page optimization Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 11/58] KVM: x86: release time_page on vcpu destruction Greg KH
` (49 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 UTC (permalink / raw)
To: linux-kernel, stable, jejb
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Jan Kiszka, Avi Kivity, Chris Wright
[-- Attachment #1: kvm-fix-overlapping-check-for-memory-slots.patch --]
[-- Type: text/plain, Size: 1689 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jan Kiszka <jan.kiszka@web.de>
upstream commit: 4cd481f68dde99ac416003b825c835f71e364393
When checking for overlapping slots on registration of a new one, kvm
currently also considers zero-length (ie. deleted) slots and rejects
requests incorrectly. This finally denies user space from joining slots.
Fix the check by skipping deleted slots and advertise this via a
KVM_CAP_JOIN_MEMORY_REGIONS_WORKS.
Cc: stable@kernel.org
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
include/linux/kvm.h | 2 ++
virt/kvm/kvm_main.c | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -396,6 +396,8 @@ struct kvm_trace_rec {
#ifdef __KVM_HAVE_USER_NMI
#define KVM_CAP_USER_NMI 22
#endif
+/* Another bug in KVM_SET_USER_MEMORY_REGION fixed: */
+#define KVM_CAP_JOIN_MEMORY_REGIONS_WORKS 30
/*
* ioctls for VM fds
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1005,7 +1005,7 @@ int __kvm_set_memory_region(struct kvm *
for (i = 0; i < KVM_MEMORY_SLOTS; ++i) {
struct kvm_memory_slot *s = &kvm->memslots[i];
- if (s == memslot)
+ if (s == memslot || !s->npages)
continue;
if (!((base_gfn + npages <= s->base_gfn) ||
(base_gfn >= s->base_gfn + s->npages)))
@@ -1997,6 +1997,7 @@ static long kvm_dev_ioctl_check_extensio
switch (arg) {
case KVM_CAP_USER_MEMORY:
case KVM_CAP_DESTROY_MEMORY_REGION_WORKS:
+ case KVM_CAP_JOIN_MEMORY_REGIONS_WORKS:
return 1;
default:
break;
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 11/58] KVM: x86: release time_page on vcpu destruction
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (9 preceding siblings ...)
2009-05-06 21:45 ` [patch 10/58] KVM: Fix overlapping check for memory slots Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 12/58] USB: Unusual Device support for Gold MP3 Player Energy Greg KH
` (48 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 UTC (permalink / raw)
To: linux-kernel, stable, jejb
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Joerg Roedel, Avi Kivity, Chris Wright
[-- Attachment #1: kvm-x86-release-time_page-on-vcpu-destruction.patch --]
[-- Type: text/plain, Size: 855 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Joerg Roedel <joerg.roedel@amd.com>
upstream commit: 7f1ea208968f021943d4103ba59e06bb6d8239cb
Not releasing the time_page causes a leak of that page or the compound
page it is situated in.
Cc: stable@kernel.org
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
arch/x86/kvm/x86.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3962,6 +3962,11 @@ EXPORT_SYMBOL_GPL(kvm_put_guest_fpu);
void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu)
{
+ if (vcpu->arch.time_page) {
+ kvm_release_page_dirty(vcpu->arch.time_page);
+ vcpu->arch.time_page = NULL;
+ }
+
kvm_x86_ops->vcpu_free(vcpu);
}
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 12/58] USB: Unusual Device support for Gold MP3 Player Energy
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (10 preceding siblings ...)
2009-05-06 21:45 ` [patch 11/58] KVM: x86: release time_page on vcpu destruction Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 13/58] virtio-rng: Remove false BUG for spurious callbacks Greg KH
` (47 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 UTC (permalink / raw)
To: linux-kernel, stable, jejb
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Chuck Short, Tim Gardner, Stefan Bader, Chris Wright
[-- Attachment #1: usb-unusual-device-support-for-gold-mp3-player-energy.patch --]
[-- Type: text/plain, Size: 1562 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Chuck Short <zulcss@ubuntu.com>
upstream commit: 46c6e93faa85d1362e1d127dc28cf9d0b304a6f1
Reported by Alessio Treglia on
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/125250
User was getting the following errors in dmesg:
[ 2158.139386] sd 5:0:0:1: ioctl_internal_command return code = 8000002
[ 2158.139390] : Current: sense key: No Sense
[ 2158.139393] Additional sense: No additional sense information
Adds unusual device support.
modified: drivers/usb/storage/unusual_devs.h
Signed-off-by: Chuck Short <zulcss@ubuntu.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
drivers/usb/storage/unusual_devs.h | 6 ++++++
1 file changed, 6 insertions(+)
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -2134,6 +2134,12 @@ UNUSUAL_DEV( 0xed06, 0x4500, 0x0001, 0x
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_CAPACITY_HEURISTICS),
+/* Reported by Alessio Treglia <quadrispro@ubuntu.com> */
+UNUSUAL_DEV( 0xed10, 0x7636, 0x0001, 0x0001,
+ "TGE",
+ "Digital MP3 Audio Player",
+ US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ),
+
/* Control/Bulk transport for all SubClass values */
USUAL_DEV(US_SC_RBC, US_PR_CB, USB_US_TYPE_STOR),
USUAL_DEV(US_SC_8020, US_PR_CB, USB_US_TYPE_STOR),
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 13/58] virtio-rng: Remove false BUG for spurious callbacks
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (11 preceding siblings ...)
2009-05-06 21:45 ` [patch 12/58] USB: Unusual Device support for Gold MP3 Player Energy Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 14/58] b44: Use kernel DMA addresses for the kernel DMA API Greg KH
` (46 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 UTC (permalink / raw)
To: linux-kernel, stable, jejb
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Christian Borntraeger, Rusty Russell, Chris Wright
[-- Attachment #1: virtio-rng-remove-false-bug-for-spurious-callbacks.patch --]
[-- Type: text/plain, Size: 1146 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Christian Borntraeger <borntraeger@de.ibm.com>
upstream commit: e5b89542ea18020961882228c26db3ba87f6e608
The virtio-rng drivers checks for spurious callbacks. Since
callbacks can be implemented via shared interrupts (e.g. PCI) this
could lead to guest kernel oopses with lots of virtio devices.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
drivers/char/hw_random/virtio-rng.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/char/hw_random/virtio-rng.c
+++ b/drivers/char/hw_random/virtio-rng.c
@@ -37,9 +37,9 @@ static void random_recv_done(struct virt
{
int len;
- /* We never get spurious callbacks. */
+ /* We can get spurious callbacks, e.g. shared IRQs + virtio_pci. */
if (!vq->vq_ops->get_buf(vq, &len))
- BUG();
+ return;
data_left = len / sizeof(random_data[0]);
complete(&have_data);
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 14/58] b44: Use kernel DMA addresses for the kernel DMA API
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (12 preceding siblings ...)
2009-05-06 21:45 ` [patch 13/58] virtio-rng: Remove false BUG for spurious callbacks Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 15/58] block: include empty disks in /proc/diskstats Greg KH
` (45 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Michael Buesch, David S. Miller
[-- Attachment #1: b44-use-kernel-dma-addresses-for-the-kernel-dma-api.patch --]
[-- Type: text/plain, Size: 1033 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Michael Buesch <mb@bu3sch.de>
commit 37efa239901493694a48f1d6f59f8de17c2c4509 upstream.
We must not use the device DMA addresses for the kernel DMA API, because
device DMA addresses have an additional offset added for the SSB translation.
Use the original dma_addr_t for the sync operation.
Cc: stable@kernel.org
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/b44.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -750,7 +750,7 @@ static void b44_recycle_rx(struct b44 *b
dest_idx * sizeof(dest_desc),
DMA_BIDIRECTIONAL);
- ssb_dma_sync_single_for_device(bp->sdev, le32_to_cpu(src_desc->addr),
+ ssb_dma_sync_single_for_device(bp->sdev, dest_map->mapping,
RX_PKT_BUF_SZ,
DMA_FROM_DEVICE);
}
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 15/58] block: include empty disks in /proc/diskstats
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (13 preceding siblings ...)
2009-05-06 21:45 ` [patch 14/58] b44: Use kernel DMA addresses for the kernel DMA API Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 16/58] crypto: ixp4xx - Fix handling of chained sg buffers Greg KH
` (44 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Tejun Heo, Jens Axboe
[-- Attachment #1: block-include-empty-disks-in-proc-diskstats.patch --]
[-- Type: text/plain, Size: 2817 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Tejun Heo <tj@kernel.org>
commit 71982a409f12c50d011325a4471aa20666bb908d upstream.
/proc/diskstats used to show stats for all disks whether they're
zero-sized or not and their non-zero partitions. Commit
074a7aca7afa6f230104e8e65eba3420263714a5 accidentally changed the
behavior such that it doesn't print out zero sized disks. This patch
implements DISK_PITER_INCL_EMPTY_PART0 flag to partition iterator and
uses it in diskstats_show() such that empty part0 is shown in
/proc/diskstats.
Reported and bisectd by Dianel Collins.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Daniel Collins <solemnwarning@solemnwarning.no-ip.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
block/genhd.c | 12 ++++++++----
include/linux/genhd.h | 1 +
2 files changed, 9 insertions(+), 4 deletions(-)
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -98,7 +98,7 @@ void disk_part_iter_init(struct disk_par
if (flags & DISK_PITER_REVERSE)
piter->idx = ptbl->len - 1;
- else if (flags & DISK_PITER_INCL_PART0)
+ else if (flags & (DISK_PITER_INCL_PART0 | DISK_PITER_INCL_EMPTY_PART0))
piter->idx = 0;
else
piter->idx = 1;
@@ -134,7 +134,8 @@ struct hd_struct *disk_part_iter_next(st
/* determine iteration parameters */
if (piter->flags & DISK_PITER_REVERSE) {
inc = -1;
- if (piter->flags & DISK_PITER_INCL_PART0)
+ if (piter->flags & (DISK_PITER_INCL_PART0 |
+ DISK_PITER_INCL_EMPTY_PART0))
end = -1;
else
end = 0;
@@ -150,7 +151,10 @@ struct hd_struct *disk_part_iter_next(st
part = rcu_dereference(ptbl->part[piter->idx]);
if (!part)
continue;
- if (!(piter->flags & DISK_PITER_INCL_EMPTY) && !part->nr_sects)
+ if (!part->nr_sects &&
+ !(piter->flags & DISK_PITER_INCL_EMPTY) &&
+ !(piter->flags & DISK_PITER_INCL_EMPTY_PART0 &&
+ piter->idx == 0))
continue;
get_device(part_to_dev(part));
@@ -1011,7 +1015,7 @@ static int diskstats_show(struct seq_fil
"\n\n");
*/
- disk_part_iter_init(&piter, gp, DISK_PITER_INCL_PART0);
+ disk_part_iter_init(&piter, gp, DISK_PITER_INCL_EMPTY_PART0);
while ((hd = disk_part_iter_next(&piter))) {
cpu = part_stat_lock();
part_round_stats(cpu, hd);
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -214,6 +214,7 @@ static inline void disk_put_part(struct
#define DISK_PITER_REVERSE (1 << 0) /* iterate in the reverse direction */
#define DISK_PITER_INCL_EMPTY (1 << 1) /* include 0-sized parts */
#define DISK_PITER_INCL_PART0 (1 << 2) /* include partition 0 */
+#define DISK_PITER_INCL_EMPTY_PART0 (1 << 3) /* include empty partition 0 */
struct disk_part_iter {
struct gendisk *disk;
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 16/58] crypto: ixp4xx - Fix handling of chained sg buffers
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (14 preceding siblings ...)
2009-05-06 21:45 ` [patch 15/58] block: include empty disks in /proc/diskstats Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 17/58] exit_notify: kill the wrong capable(CAP_KILL) check (CVE-2009-1337) Greg KH
` (43 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Christian Hohnstaedt, Herbert Xu
[-- Attachment #1: crypto-ixp4xx-fix-handling-of-chained-sg-buffers.patch --]
[-- Type: text/plain, Size: 12235 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Christian Hohnstaedt <chohnstaedt@innominate.com>
commit 0d44dc59b2b434b29aafeae581d06f81efac7c83 upstream.
- keep dma functions away from chained scatterlists.
Use the existing scatterlist iteration inside the driver
to call dma_map_single() for each chunk and avoid dma_map_sg().
Signed-off-by: Christian Hohnstaedt <chohnstaedt@innominate.com>
Tested-By: Karl Hiramoto <karl@hiramoto.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/crypto/ixp4xx_crypto.c | 184 ++++++++++++++---------------------------
1 file changed, 64 insertions(+), 120 deletions(-)
--- a/drivers/crypto/ixp4xx_crypto.c
+++ b/drivers/crypto/ixp4xx_crypto.c
@@ -101,6 +101,7 @@ struct buffer_desc {
u32 phys_addr;
u32 __reserved[4];
struct buffer_desc *next;
+ enum dma_data_direction dir;
};
struct crypt_ctl {
@@ -132,14 +133,10 @@ struct crypt_ctl {
struct ablk_ctx {
struct buffer_desc *src;
struct buffer_desc *dst;
- unsigned src_nents;
- unsigned dst_nents;
};
struct aead_ctx {
struct buffer_desc *buffer;
- unsigned short assoc_nents;
- unsigned short src_nents;
struct scatterlist ivlist;
/* used when the hmac is not on one sg entry */
u8 *hmac_virt;
@@ -312,7 +309,7 @@ static struct crypt_ctl *get_crypt_desc_
}
}
-static void free_buf_chain(struct buffer_desc *buf, u32 phys)
+static void free_buf_chain(struct device *dev, struct buffer_desc *buf,u32 phys)
{
while (buf) {
struct buffer_desc *buf1;
@@ -320,6 +317,7 @@ static void free_buf_chain(struct buffer
buf1 = buf->next;
phys1 = buf->phys_next;
+ dma_unmap_single(dev, buf->phys_next, buf->buf_len, buf->dir);
dma_pool_free(buffer_pool, buf, phys);
buf = buf1;
phys = phys1;
@@ -348,7 +346,6 @@ static void one_packet(dma_addr_t phys)
struct crypt_ctl *crypt;
struct ixp_ctx *ctx;
int failed;
- enum dma_data_direction src_direction = DMA_BIDIRECTIONAL;
failed = phys & 0x1 ? -EBADMSG : 0;
phys &= ~0x3;
@@ -358,13 +355,8 @@ static void one_packet(dma_addr_t phys)
case CTL_FLAG_PERFORM_AEAD: {
struct aead_request *req = crypt->data.aead_req;
struct aead_ctx *req_ctx = aead_request_ctx(req);
- dma_unmap_sg(dev, req->assoc, req_ctx->assoc_nents,
- DMA_TO_DEVICE);
- dma_unmap_sg(dev, &req_ctx->ivlist, 1, DMA_BIDIRECTIONAL);
- dma_unmap_sg(dev, req->src, req_ctx->src_nents,
- DMA_BIDIRECTIONAL);
- free_buf_chain(req_ctx->buffer, crypt->src_buf);
+ free_buf_chain(dev, req_ctx->buffer, crypt->src_buf);
if (req_ctx->hmac_virt) {
finish_scattered_hmac(crypt);
}
@@ -374,16 +366,11 @@ static void one_packet(dma_addr_t phys)
case CTL_FLAG_PERFORM_ABLK: {
struct ablkcipher_request *req = crypt->data.ablk_req;
struct ablk_ctx *req_ctx = ablkcipher_request_ctx(req);
- int nents;
+
if (req_ctx->dst) {
- nents = req_ctx->dst_nents;
- dma_unmap_sg(dev, req->dst, nents, DMA_FROM_DEVICE);
- free_buf_chain(req_ctx->dst, crypt->dst_buf);
- src_direction = DMA_TO_DEVICE;
- }
- nents = req_ctx->src_nents;
- dma_unmap_sg(dev, req->src, nents, src_direction);
- free_buf_chain(req_ctx->src, crypt->src_buf);
+ free_buf_chain(dev, req_ctx->dst, crypt->dst_buf);
+ }
+ free_buf_chain(dev, req_ctx->src, crypt->src_buf);
req->base.complete(&req->base, failed);
break;
}
@@ -750,56 +737,35 @@ static int setup_cipher(struct crypto_tf
return 0;
}
-static int count_sg(struct scatterlist *sg, int nbytes)
-{
- int i;
- for (i = 0; nbytes > 0; i++, sg = sg_next(sg))
- nbytes -= sg->length;
- return i;
-}
-
-static struct buffer_desc *chainup_buffers(struct scatterlist *sg,
- unsigned nbytes, struct buffer_desc *buf, gfp_t flags)
+static struct buffer_desc *chainup_buffers(struct device *dev,
+ struct scatterlist *sg, unsigned nbytes,
+ struct buffer_desc *buf, gfp_t flags,
+ enum dma_data_direction dir)
{
- int nents = 0;
-
- while (nbytes > 0) {
+ for (;nbytes > 0; sg = scatterwalk_sg_next(sg)) {
+ unsigned len = min(nbytes, sg->length);
struct buffer_desc *next_buf;
u32 next_buf_phys;
- unsigned len = min(nbytes, sg_dma_len(sg));
+ void *ptr;
- nents++;
nbytes -= len;
- if (!buf->phys_addr) {
- buf->phys_addr = sg_dma_address(sg);
- buf->buf_len = len;
- buf->next = NULL;
- buf->phys_next = 0;
- goto next;
- }
- /* Two consecutive chunks on one page may be handled by the old
- * buffer descriptor, increased by the length of the new one
- */
- if (sg_dma_address(sg) == buf->phys_addr + buf->buf_len) {
- buf->buf_len += len;
- goto next;
- }
+ ptr = page_address(sg_page(sg)) + sg->offset;
next_buf = dma_pool_alloc(buffer_pool, flags, &next_buf_phys);
- if (!next_buf)
- return NULL;
+ if (!next_buf) {
+ buf = NULL;
+ break;
+ }
+ sg_dma_address(sg) = dma_map_single(dev, ptr, len, dir);
buf->next = next_buf;
buf->phys_next = next_buf_phys;
-
buf = next_buf;
- buf->next = NULL;
- buf->phys_next = 0;
+
buf->phys_addr = sg_dma_address(sg);
buf->buf_len = len;
-next:
- if (nbytes > 0) {
- sg = sg_next(sg);
- }
+ buf->dir = dir;
}
+ buf->next = NULL;
+ buf->phys_next = 0;
return buf;
}
@@ -860,12 +826,12 @@ static int ablk_perform(struct ablkciphe
struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(req);
struct ixp_ctx *ctx = crypto_ablkcipher_ctx(tfm);
unsigned ivsize = crypto_ablkcipher_ivsize(tfm);
- int ret = -ENOMEM;
struct ix_sa_dir *dir;
struct crypt_ctl *crypt;
- unsigned int nbytes = req->nbytes, nents;
+ unsigned int nbytes = req->nbytes;
enum dma_data_direction src_direction = DMA_BIDIRECTIONAL;
struct ablk_ctx *req_ctx = ablkcipher_request_ctx(req);
+ struct buffer_desc src_hook;
gfp_t flags = req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP ?
GFP_KERNEL : GFP_ATOMIC;
@@ -878,7 +844,7 @@ static int ablk_perform(struct ablkciphe
crypt = get_crypt_desc();
if (!crypt)
- return ret;
+ return -ENOMEM;
crypt->data.ablk_req = req;
crypt->crypto_ctx = dir->npe_ctx_phys;
@@ -891,53 +857,41 @@ static int ablk_perform(struct ablkciphe
BUG_ON(ivsize && !req->info);
memcpy(crypt->iv, req->info, ivsize);
if (req->src != req->dst) {
+ struct buffer_desc dst_hook;
crypt->mode |= NPE_OP_NOT_IN_PLACE;
- nents = count_sg(req->dst, nbytes);
/* This was never tested by Intel
* for more than one dst buffer, I think. */
- BUG_ON(nents != 1);
- req_ctx->dst_nents = nents;
- dma_map_sg(dev, req->dst, nents, DMA_FROM_DEVICE);
- req_ctx->dst = dma_pool_alloc(buffer_pool, flags,&crypt->dst_buf);
- if (!req_ctx->dst)
- goto unmap_sg_dest;
- req_ctx->dst->phys_addr = 0;
- if (!chainup_buffers(req->dst, nbytes, req_ctx->dst, flags))
+ BUG_ON(req->dst->length < nbytes);
+ req_ctx->dst = NULL;
+ if (!chainup_buffers(dev, req->dst, nbytes, &dst_hook,
+ flags, DMA_FROM_DEVICE))
goto free_buf_dest;
src_direction = DMA_TO_DEVICE;
+ req_ctx->dst = dst_hook.next;
+ crypt->dst_buf = dst_hook.phys_next;
} else {
req_ctx->dst = NULL;
- req_ctx->dst_nents = 0;
}
- nents = count_sg(req->src, nbytes);
- req_ctx->src_nents = nents;
- dma_map_sg(dev, req->src, nents, src_direction);
-
- req_ctx->src = dma_pool_alloc(buffer_pool, flags, &crypt->src_buf);
- if (!req_ctx->src)
- goto unmap_sg_src;
- req_ctx->src->phys_addr = 0;
- if (!chainup_buffers(req->src, nbytes, req_ctx->src, flags))
+ req_ctx->src = NULL;
+ if (!chainup_buffers(dev, req->src, nbytes, &src_hook,
+ flags, src_direction))
goto free_buf_src;
+ req_ctx->src = src_hook.next;
+ crypt->src_buf = src_hook.phys_next;
crypt->ctl_flags |= CTL_FLAG_PERFORM_ABLK;
qmgr_put_entry(SEND_QID, crypt_virt2phys(crypt));
BUG_ON(qmgr_stat_overflow(SEND_QID));
return -EINPROGRESS;
free_buf_src:
- free_buf_chain(req_ctx->src, crypt->src_buf);
-unmap_sg_src:
- dma_unmap_sg(dev, req->src, req_ctx->src_nents, src_direction);
+ free_buf_chain(dev, req_ctx->src, crypt->src_buf);
free_buf_dest:
if (req->src != req->dst) {
- free_buf_chain(req_ctx->dst, crypt->dst_buf);
-unmap_sg_dest:
- dma_unmap_sg(dev, req->src, req_ctx->dst_nents,
- DMA_FROM_DEVICE);
+ free_buf_chain(dev, req_ctx->dst, crypt->dst_buf);
}
crypt->ctl_flags = CTL_FLAG_UNUSED;
- return ret;
+ return -ENOMEM;
}
static int ablk_encrypt(struct ablkcipher_request *req)
@@ -985,7 +939,7 @@ static int hmac_inconsistent(struct scat
break;
offset += sg->length;
- sg = sg_next(sg);
+ sg = scatterwalk_sg_next(sg);
}
return (start + nbytes > offset + sg->length);
}
@@ -997,11 +951,10 @@ static int aead_perform(struct aead_requ
struct ixp_ctx *ctx = crypto_aead_ctx(tfm);
unsigned ivsize = crypto_aead_ivsize(tfm);
unsigned authsize = crypto_aead_authsize(tfm);
- int ret = -ENOMEM;
struct ix_sa_dir *dir;
struct crypt_ctl *crypt;
- unsigned int cryptlen, nents;
- struct buffer_desc *buf;
+ unsigned int cryptlen;
+ struct buffer_desc *buf, src_hook;
struct aead_ctx *req_ctx = aead_request_ctx(req);
gfp_t flags = req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP ?
GFP_KERNEL : GFP_ATOMIC;
@@ -1022,7 +975,7 @@ static int aead_perform(struct aead_requ
}
crypt = get_crypt_desc();
if (!crypt)
- return ret;
+ return -ENOMEM;
crypt->data.aead_req = req;
crypt->crypto_ctx = dir->npe_ctx_phys;
@@ -1041,31 +994,27 @@ static int aead_perform(struct aead_requ
BUG(); /* -ENOTSUP because of my lazyness */
}
- req_ctx->buffer = dma_pool_alloc(buffer_pool, flags, &crypt->src_buf);
- if (!req_ctx->buffer)
- goto out;
- req_ctx->buffer->phys_addr = 0;
/* ASSOC data */
- nents = count_sg(req->assoc, req->assoclen);
- req_ctx->assoc_nents = nents;
- dma_map_sg(dev, req->assoc, nents, DMA_TO_DEVICE);
- buf = chainup_buffers(req->assoc, req->assoclen, req_ctx->buffer,flags);
+ buf = chainup_buffers(dev, req->assoc, req->assoclen, &src_hook,
+ flags, DMA_TO_DEVICE);
+ req_ctx->buffer = src_hook.next;
+ crypt->src_buf = src_hook.phys_next;
if (!buf)
- goto unmap_sg_assoc;
+ goto out;
/* IV */
sg_init_table(&req_ctx->ivlist, 1);
sg_set_buf(&req_ctx->ivlist, iv, ivsize);
- dma_map_sg(dev, &req_ctx->ivlist, 1, DMA_BIDIRECTIONAL);
- buf = chainup_buffers(&req_ctx->ivlist, ivsize, buf, flags);
+ buf = chainup_buffers(dev, &req_ctx->ivlist, ivsize, buf, flags,
+ DMA_BIDIRECTIONAL);
if (!buf)
- goto unmap_sg_iv;
+ goto free_chain;
if (unlikely(hmac_inconsistent(req->src, cryptlen, authsize))) {
/* The 12 hmac bytes are scattered,
* we need to copy them into a safe buffer */
req_ctx->hmac_virt = dma_pool_alloc(buffer_pool, flags,
&crypt->icv_rev_aes);
if (unlikely(!req_ctx->hmac_virt))
- goto unmap_sg_iv;
+ goto free_chain;
if (!encrypt) {
scatterwalk_map_and_copy(req_ctx->hmac_virt,
req->src, cryptlen, authsize, 0);
@@ -1075,33 +1024,28 @@ static int aead_perform(struct aead_requ
req_ctx->hmac_virt = NULL;
}
/* Crypt */
- nents = count_sg(req->src, cryptlen + authsize);
- req_ctx->src_nents = nents;
- dma_map_sg(dev, req->src, nents, DMA_BIDIRECTIONAL);
- buf = chainup_buffers(req->src, cryptlen + authsize, buf, flags);
+ buf = chainup_buffers(dev, req->src, cryptlen + authsize, buf, flags,
+ DMA_BIDIRECTIONAL);
if (!buf)
- goto unmap_sg_src;
+ goto free_hmac_virt;
if (!req_ctx->hmac_virt) {
crypt->icv_rev_aes = buf->phys_addr + buf->buf_len - authsize;
}
+
crypt->ctl_flags |= CTL_FLAG_PERFORM_AEAD;
qmgr_put_entry(SEND_QID, crypt_virt2phys(crypt));
BUG_ON(qmgr_stat_overflow(SEND_QID));
return -EINPROGRESS;
-unmap_sg_src:
- dma_unmap_sg(dev, req->src, req_ctx->src_nents, DMA_BIDIRECTIONAL);
+free_hmac_virt:
if (req_ctx->hmac_virt) {
dma_pool_free(buffer_pool, req_ctx->hmac_virt,
crypt->icv_rev_aes);
}
-unmap_sg_iv:
- dma_unmap_sg(dev, &req_ctx->ivlist, 1, DMA_BIDIRECTIONAL);
-unmap_sg_assoc:
- dma_unmap_sg(dev, req->assoc, req_ctx->assoc_nents, DMA_TO_DEVICE);
- free_buf_chain(req_ctx->buffer, crypt->src_buf);
+free_chain:
+ free_buf_chain(dev, req_ctx->buffer, crypt->src_buf);
out:
crypt->ctl_flags = CTL_FLAG_UNUSED;
- return ret;
+ return -ENOMEM;
}
static int aead_setup(struct crypto_aead *tfm, unsigned int authsize)
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 17/58] exit_notify: kill the wrong capable(CAP_KILL) check (CVE-2009-1337)
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (15 preceding siblings ...)
2009-05-06 21:45 ` [patch 16/58] crypto: ixp4xx - Fix handling of chained sg buffers Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 18/58] PCI: fix incorrect mask of PM No_Soft_Reset bit Greg KH
` (42 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Oleg Nesterov, Serge Hallyn, Roland McGrath
[-- Attachment #1: exit_notify-kill-the-wrong-capable-check.patch --]
[-- Type: text/plain, Size: 1191 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Oleg Nesterov <oleg@redhat.com>
CVE-2009-1337
commit 432870dab85a2f69dc417022646cb9a70acf7f94 upstream.
The CAP_KILL check in exit_notify() looks just wrong, kill it.
Whatever logic we have to reset ->exit_signal, the malicious user
can bypass it if it execs the setuid application before exiting.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/exit.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -950,8 +950,7 @@ static void exit_notify(struct task_stru
*/
if (tsk->exit_signal != SIGCHLD && !task_detached(tsk) &&
(tsk->parent_exec_id != tsk->real_parent->self_exec_id ||
- tsk->self_exec_id != tsk->parent_exec_id) &&
- !capable(CAP_KILL))
+ tsk->self_exec_id != tsk->parent_exec_id))
tsk->exit_signal = SIGCHLD;
signal = tracehook_notify_death(tsk, &cookie, group_dead);
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 18/58] PCI: fix incorrect mask of PM No_Soft_Reset bit
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (16 preceding siblings ...)
2009-05-06 21:45 ` [patch 17/58] exit_notify: kill the wrong capable(CAP_KILL) check (CVE-2009-1337) Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 19/58] unreached code in selinux_ip_postroute_iptables_compat() (CVE-2009-1184) Greg KH
` (41 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Yu Zhao, Jesse Barnes
[-- Attachment #1: pci-fix-incorrect-mask-of-pm-no_soft_reset-bit.patch --]
[-- Type: text/plain, Size: 1106 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Yu Zhao <yu.zhao@intel.com>
commit 998dd7c719f62dcfa91d7bf7f4eb9c160e03d817 upstream.
Reviewed-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/linux/pci_regs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/include/linux/pci_regs.h
+++ b/include/linux/pci_regs.h
@@ -235,7 +235,7 @@
#define PCI_PM_CAP_PME_SHIFT 11 /* Start of the PME Mask in PMC */
#define PCI_PM_CTRL 4 /* PM control and status register */
#define PCI_PM_CTRL_STATE_MASK 0x0003 /* Current power state (D0 to D3) */
-#define PCI_PM_CTRL_NO_SOFT_RESET 0x0004 /* No reset for D3hot->D0 */
+#define PCI_PM_CTRL_NO_SOFT_RESET 0x0008 /* No reset for D3hot->D0 */
#define PCI_PM_CTRL_PME_ENABLE 0x0100 /* PME pin enable */
#define PCI_PM_CTRL_DATA_SEL_MASK 0x1e00 /* Data select (??) */
#define PCI_PM_CTRL_DATA_SCALE_MASK 0x6000 /* Data scale (??) */
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 19/58] unreached code in selinux_ip_postroute_iptables_compat() (CVE-2009-1184)
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (17 preceding siblings ...)
2009-05-06 21:45 ` [patch 18/58] PCI: fix incorrect mask of PM No_Soft_Reset bit Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 20/58] drm/i915: add support for G41 chipset Greg KH
` (40 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 UTC (permalink / raw)
To: linux-kernel, stable, paul.moore
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, jmorris, greg, chrisw, error27, Eugene Teo
[-- Attachment #1: unreached-code-in-selinux_ip_postroute_iptables_compat.patch --]
[-- Type: text/plain, Size: 931 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Eugene Teo <eteo@redhat.com>
Not upstream in 2.6.30, as the function was removed there, making this a
non-issue.
Node and port send checks can skip in the compat_net=1 case. This bug
was introduced in commit effad8d.
Signed-off-by: Eugene Teo <eugeneteo@kernel.sg>
Reported-by: Dan Carpenter <error27@gmail.com>
Acked-by: James Morris <jmorris@namei.org>
Acked-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
security/selinux/hooks.c | 1 +
1 file changed, 1 insertion(+)
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -4661,6 +4661,7 @@ static int selinux_ip_postroute_iptables
if (err)
return err;
err = avc_has_perm(sk_sid, if_sid, SECCLASS_NETIF, netif_perm, ad);
+ if (err)
return err;
err = sel_netnode_sid(addrp, family, &node_sid);
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 20/58] drm/i915: add support for G41 chipset
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (18 preceding siblings ...)
2009-05-06 21:45 ` [patch 19/58] unreached code in selinux_ip_postroute_iptables_compat() (CVE-2009-1184) Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 21/58] x86-64: fix FPU corruption with signals and preemption Greg KH
` (39 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Zhenyu Wang, Eric Anholt
[-- Attachment #1: drm-i915-add-support-for-g41-chipset.patch --]
[-- Type: text/plain, Size: 1945 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Zhenyu Wang <zhenyu.z.wang@intel.com>
commit 72021788678523047161e97b3dfed695e802a5fd upstream.
This had been delayed for some time due to failure to work on the one piece
of G41 hardware we had, and lack of success reports from anybody else.
Current hardware appears to be OK.
Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
[anholt: hand-applied due to conflicts with IGD patches]
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/i915/i915_drv.h | 4 +++-
include/drm/drm_pciids.h | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -773,7 +773,8 @@ extern int i915_wait_ring(struct drm_dev
(dev)->pci_device == 0x2A42 || \
(dev)->pci_device == 0x2E02 || \
(dev)->pci_device == 0x2E12 || \
- (dev)->pci_device == 0x2E22)
+ (dev)->pci_device == 0x2E22 || \
+ (dev)->pci_device == 0x2E32)
#define IS_I965GM(dev) ((dev)->pci_device == 0x2A02)
@@ -782,6 +783,7 @@ extern int i915_wait_ring(struct drm_dev
#define IS_G4X(dev) ((dev)->pci_device == 0x2E02 || \
(dev)->pci_device == 0x2E12 || \
(dev)->pci_device == 0x2E22 || \
+ (dev)->pci_device == 0x2E32 || \
IS_GM45(dev))
#define IS_G33(dev) ((dev)->pci_device == 0x29C2 || \
--- a/include/drm/drm_pciids.h
+++ b/include/drm/drm_pciids.h
@@ -418,4 +418,5 @@
{0x8086, 0x2e02, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
{0x8086, 0x2e12, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
{0x8086, 0x2e22, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
+ {0x8086, 0x2e32, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
{0, 0, 0}
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 21/58] x86-64: fix FPU corruption with signals and preemption
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (19 preceding siblings ...)
2009-05-06 21:45 ` [patch 20/58] drm/i915: add support for G41 chipset Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 22/58] x86/PCI: dont call e820_all_mapped with -1 in the mmconfig case Greg KH
` (38 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Suresh Siddha, H. Peter Anvin
[-- Attachment #1: x86-64-fix-fpu-corruption-with-signals-and-preemption.patch --]
[-- Type: text/plain, Size: 2155 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Suresh Siddha <suresh.b.siddha@intel.com>
commit 06c38d5e36b12d040839ff224e805146c0368556 upstream.
In 64bit signal delivery path, clear_used_math() was happening before saving
the current active FPU state on to the user stack for signal handling. Between
clear_used_math() and the state store on to the user stack, potentially we
can get a page fault for the user address and can block. Infact, while testing
we were hitting the might_fault() in __clear_user() which can do a schedule().
At a later point in time, we will schedule back into this process and
resume the save state (using "xsave/fxsave" instruction) which can lead
to DNA fault. And as used_math was cleared before, we will reinit the FP state
in the DNA fault and continue. This reinit will result in loosing the
FPU state of the process.
Move clear_used_math() to a point after the FPU state has been stored
onto the user stack.
This issue is present from a long time (even before the xsave changes
and the x86 merge). But it can easily be exposed in 2.6.28.x and 2.6.29.x
series because of the __clear_user() in this path, which has an explicit
__cond_resched() leading to a context switch with CONFIG_PREEMPT_VOLUNTARY.
[ Impact: fix FPU state corruption ]
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/kernel/xsave.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/arch/x86/kernel/xsave.c
+++ b/arch/x86/kernel/xsave.c
@@ -89,7 +89,7 @@ int save_i387_xstate(void __user *buf)
if (!used_math())
return 0;
- clear_used_math(); /* trigger finit */
+
if (task_thread_info(tsk)->status & TS_USEDFPU) {
/*
* Start with clearing the user buffer. This will present a
@@ -114,6 +114,8 @@ int save_i387_xstate(void __user *buf)
return -1;
}
+ clear_used_math(); /* trigger finit */
+
if (task_thread_info(tsk)->status & TS_XSAVE) {
struct _fpstate __user *fx = buf;
struct _xstate __user *x = buf;
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 22/58] x86/PCI: dont call e820_all_mapped with -1 in the mmconfig case
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (20 preceding siblings ...)
2009-05-06 21:45 ` [patch 21/58] x86-64: fix FPU corruption with signals and preemption Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 23/58] ASoC: Fix offset of freqmode in WM8580 PLL configuration Greg KH
` (37 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Ingo Molnar, Yinghai Lu, Jesse Barnes
[-- Attachment #1: x86-pci-don-t-call-e820_all_mapped-with-1-in-the-mmconfig-case.patch --]
[-- Type: text/plain, Size: 1594 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Yinghai Lu <yinghai@kernel.org>
commit 044cd80942e47b9de0915b627902adf05c52377f upstream.
e820_all_mapped need end is (addr + size) instead of (addr + size - 1)
Cc: stable@kernel.org
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/pci/mmconfig-shared.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/arch/x86/pci/mmconfig-shared.c
+++ b/arch/x86/pci/mmconfig-shared.c
@@ -254,7 +254,7 @@ static acpi_status __init check_mcfg_res
if (!fixmem32)
return AE_OK;
if ((mcfg_res->start >= fixmem32->address) &&
- (mcfg_res->end < (fixmem32->address +
+ (mcfg_res->end <= (fixmem32->address +
fixmem32->address_length))) {
mcfg_res->flags = 1;
return AE_CTRL_TERMINATE;
@@ -271,7 +271,7 @@ static acpi_status __init check_mcfg_res
return AE_OK;
if ((mcfg_res->start >= address.minimum) &&
- (mcfg_res->end < (address.minimum + address.address_length))) {
+ (mcfg_res->end <= (address.minimum + address.address_length))) {
mcfg_res->flags = 1;
return AE_CTRL_TERMINATE;
}
@@ -318,7 +318,7 @@ static int __init is_mmconf_reserved(che
u64 old_size = size;
int valid = 0;
- while (!is_reserved(addr, addr + size - 1, E820_RESERVED)) {
+ while (!is_reserved(addr, addr + size, E820_RESERVED)) {
size >>= 1;
if (size < (16UL<<20))
break;
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 23/58] ASoC: Fix offset of freqmode in WM8580 PLL configuration
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (21 preceding siblings ...)
2009-05-06 21:45 ` [patch 22/58] x86/PCI: dont call e820_all_mapped with -1 in the mmconfig case Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 24/58] PCI quirk: disable MSI on VIA VT3364 chipsets Greg KH
` (36 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Mark Brown
[-- Attachment #1: asoc-fix-offset-of-freqmode-in-wm8580-pll-configuration.patch --]
[-- Type: text/plain, Size: 774 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
commit ce88168f5b5eca7f40394fa6b05ae29f4b685569 upstream.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/soc/codecs/wm8580.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/sound/soc/codecs/wm8580.c
+++ b/sound/soc/codecs/wm8580.c
@@ -533,7 +533,7 @@ static int wm8580_set_dai_pll(struct snd
reg = wm8580_read(codec, WM8580_PLLA4 + offset);
reg &= ~0x3f;
reg |= pll_div.prescale | pll_div.postscale << 1 |
- pll_div.freqmode << 4;
+ pll_div.freqmode << 3;
wm8580_write(codec, WM8580_PLLA4 + offset, reg);
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 24/58] PCI quirk: disable MSI on VIA VT3364 chipsets
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (22 preceding siblings ...)
2009-05-06 21:45 ` [patch 23/58] ASoC: Fix offset of freqmode in WM8580 PLL configuration Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 25/58] bio: fix memcpy corruption in bio_copy_user_iov() Greg KH
` (35 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Thomas Renninger, Jesse Barnes
[-- Attachment #1: pci-quirk-disable-msi-on-via-vt3364-chipsets.patch --]
[-- Type: text/plain, Size: 1336 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Thomas Renninger <trenn@suse.de>
commit 162dedd39dcc6eca3fc0d29cf19658c6c13b840e upstream.
Without this patch, Broadcom BCM5906 Ethernet controllers set up via MSI
cause the machine to hang. Tejun agreed that the best is to blacklist
the whole chipset and after adding it, seeing the other VIA quirks
disabling MSI, this very much looks like the right way.
Cc: <stable@kernel.org>
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/pci/quirks.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1960,6 +1960,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AT
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480, quirk_disable_all_msi);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3336, quirk_disable_all_msi);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3351, quirk_disable_all_msi);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3364, quirk_disable_all_msi);
/* Disable MSI on chipsets that are known to not support it */
static void __devinit quirk_disable_msi(struct pci_dev *dev)
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 25/58] bio: fix memcpy corruption in bio_copy_user_iov()
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (23 preceding siblings ...)
2009-05-06 21:45 ` [patch 24/58] PCI quirk: disable MSI on VIA VT3364 chipsets Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 26/58] drm/i915: allow tiled front buffers on 965+ Greg KH
` (34 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, FUJITA Tomonori, Jens Axboe
[-- Attachment #1: bio-fix-memcpy-corruption-in-bio_copy_user_iov.patch --]
[-- Type: text/plain, Size: 921 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
commit 69838727bcd819a8fd73a88447801221788b0c6d upstream.
st driver uses blk_rq_map_user() in order to just build a request out
of page frames. In this case, map_data->offset is a non zero value and
iov[0].iov_base is NULL. We need to increase nr_pages for that.
Cc: stable@kernel.org
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/bio.c | 3 +++
1 file changed, 3 insertions(+)
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -806,6 +806,9 @@ struct bio *bio_copy_user_iov(struct req
len += iov[i].iov_len;
}
+ if (offset)
+ nr_pages++;
+
bmd = bio_alloc_map_data(nr_pages, iov_count, gfp_mask);
if (!bmd)
return ERR_PTR(-ENOMEM);
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 26/58] drm/i915: allow tiled front buffers on 965+
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (24 preceding siblings ...)
2009-05-06 21:45 ` [patch 25/58] bio: fix memcpy corruption in bio_copy_user_iov() Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 27/58] pagemap: require aligned-length, non-null reads of /proc/pid/pagemap Greg KH
` (33 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Jesse Barnes, Eric Anholt
[-- Attachment #1: drm-i915-allow-tiled-front-buffers-on-965.patch --]
[-- Type: text/plain, Size: 2300 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jesse Barnes <jbarnes@virtuousgeek.org>
commit f544847fbaf099278343f875987a983f2b913134 upstream.
This patch corrects a pretty big oversight in the KMS code for 965+
chips. The current code is missing tiled surface register programming,
so userland can allocate a tiled surface and use it for mode setting,
resulting in corruption. This patch fixes that, allowing for tiled
front buffers on 965+.
Cc: stable@kernel.org
Tested-by: Arkadiusz Miskiewicz <arekm@maven.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/i915/i915_reg.h | 1 +
drivers/gpu/drm/i915/intel_display.c | 9 +++++++++
2 files changed, 10 insertions(+)
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -1431,6 +1431,7 @@
#define DISPPLANE_NO_LINE_DOUBLE 0
#define DISPPLANE_STEREO_POLARITY_FIRST 0
#define DISPPLANE_STEREO_POLARITY_SECOND (1<<18)
+#define DISPPLANE_TILED (1<<10)
#define DSPAADDR 0x70184
#define DSPASTRIDE 0x70188
#define DSPAPOS 0x7018C /* reserved */
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -338,6 +338,7 @@ intel_pipe_set_base(struct drm_crtc *crt
int dspbase = (pipe == 0 ? DSPAADDR : DSPBADDR);
int dspsurf = (pipe == 0 ? DSPASURF : DSPBSURF);
int dspstride = (pipe == 0) ? DSPASTRIDE : DSPBSTRIDE;
+ int dsptileoff = (pipe == 0 ? DSPATILEOFF : DSPBTILEOFF);
int dspcntr_reg = (pipe == 0) ? DSPACNTR : DSPBCNTR;
u32 dspcntr, alignment;
int ret;
@@ -414,6 +415,13 @@ intel_pipe_set_base(struct drm_crtc *crt
mutex_unlock(&dev->struct_mutex);
return -EINVAL;
}
+ if (IS_I965G(dev)) {
+ if (obj_priv->tiling_mode != I915_TILING_NONE)
+ dspcntr |= DISPPLANE_TILED;
+ else
+ dspcntr &= ~DISPPLANE_TILED;
+ }
+
I915_WRITE(dspcntr_reg, dspcntr);
Start = obj_priv->gtt_offset;
@@ -426,6 +434,7 @@ intel_pipe_set_base(struct drm_crtc *crt
I915_READ(dspbase);
I915_WRITE(dspsurf, Start);
I915_READ(dspsurf);
+ I915_WRITE(dsptileoff, (y << 16) | x);
} else {
I915_WRITE(dspbase, Start + Offset);
I915_READ(dspbase);
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 27/58] pagemap: require aligned-length, non-null reads of /proc/pid/pagemap
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (25 preceding siblings ...)
2009-05-06 21:45 ` [patch 26/58] drm/i915: allow tiled front buffers on 965+ Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 28/58] kbuild: fix Module.markers permission error under cygwin Greg KH
` (32 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Vitaly Mayatskikh, Thomas Tuttle, Matt Mackall,
Alexey Dobriyan
[-- Attachment #1: pagemap-require-aligned-length-non-null-reads-of-proc-pid-pagemap.patch --]
[-- Type: text/plain, Size: 1287 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Vitaly Mayatskikh <v.mayatskih@gmail.com>
commit 0816178638c15ce5472d39d771a96860dff4141a upstream.
The intention of commit aae8679b0ebcaa92f99c1c3cb0cd651594a43915
("pagemap: fix bug in add_to_pagemap, require aligned-length reads of
/proc/pid/pagemap") was to force reads of /proc/pid/pagemap to be a
multiple of 8 bytes, but now it allows to read 0 bytes, which actually
puts some data to user's buffer. According to POSIX, if count is zero,
read() should return zero and has no other results.
Signed-off-by: Vitaly Mayatskikh <v.mayatskih@gmail.com>
Cc: Thomas Tuttle <ttuttle@google.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/proc/task_mmu.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -663,6 +663,10 @@ static ssize_t pagemap_read(struct file
goto out_task;
ret = 0;
+
+ if (!count)
+ goto out_task;
+
mm = get_task_mm(task);
if (!mm)
goto out_task;
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 28/58] kbuild: fix Module.markers permission error under cygwin
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (26 preceding siblings ...)
2009-05-06 21:45 ` [patch 27/58] pagemap: require aligned-length, non-null reads of /proc/pid/pagemap Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 29/58] ptrace: ptrace_attach: fix the usage of ->cred_exec_mutex Greg KH
` (31 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Cedric Hombourger, Sam Ravnborg
[-- Attachment #1: kbuild-fix-module.markers-permission-error-under-cygwin.patch --]
[-- Type: text/plain, Size: 1684 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Cedric Hombourger <chombourger@gmail.com>
commit 99e3a1eb3c22bb671c6f3d22d8244bfc9fad8185 upstream.
While building the kernel, we end-up calling modpost with -K and -M
options for the same file (Modules.markers). This is resulting in
modpost's main function calling read_markers() and then write_markers() on
the same file.
We then have read_markers() mmap'ing the file, and writer_markers()
opening that same file for writing.
The issue is that read_markers() exits without munmap'ing the file and is
as a matter holding a reference on Modules.markers. When write_markers()
is opening that very same file for writing, we still have a reference on
it and cygwin (Windows?) is then making fopen() fail with EPERM.
Calling release_file() before exiting read_markers() clears that reference
(and memory leak) and fopen() then succeeds.
Tested on both cygwin (1.3.22) and Linux. Also ran modpost within
valgrind on Linux to make sure that the munmap'ed file was not accessed
after read_markers()
Signed-off-by: Cedric Hombourger <chombourger@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
scripts/mod/modpost.c | 1 +
1 file changed, 1 insertion(+)
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -2005,6 +2005,7 @@ static void read_markers(const char *fna
if (!mod->skip)
add_marker(mod, marker, fmt);
}
+ release_file(file, size);
return;
fail:
fatal("parse error in markers list file\n");
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 29/58] ptrace: ptrace_attach: fix the usage of ->cred_exec_mutex
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (27 preceding siblings ...)
2009-05-06 21:45 ` [patch 28/58] kbuild: fix Module.markers permission error under cygwin Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 30/58] USB: serial: fix lifetime and locking problems Greg KH
` (30 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Oleg Nesterov, Roland McGrath, David Howells, James Morris
[-- Attachment #1: ptrace-ptrace_attach-fix-the-usage-of-cred_exec_mutex.patch --]
[-- Type: text/plain, Size: 1222 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Oleg Nesterov <oleg@redhat.com>
commit cad81bc2529ab8c62b6fdc83a1c0c7f4a87209eb upstream.
ptrace_attach() needs task->cred_exec_mutex, not current->cred_exec_mutex.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Roland McGrath <roland@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/ptrace.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -186,7 +186,7 @@ int ptrace_attach(struct task_struct *ta
/* Protect exec's credential calculations against our interference;
* SUID, SGID and LSM creds get determined differently under ptrace.
*/
- retval = mutex_lock_interruptible(¤t->cred_exec_mutex);
+ retval = mutex_lock_interruptible(&task->cred_exec_mutex);
if (retval < 0)
goto out;
@@ -230,7 +230,7 @@ repeat:
bad:
write_unlock_irqrestore(&tasklist_lock, flags);
task_unlock(task);
- mutex_unlock(¤t->cred_exec_mutex);
+ mutex_unlock(&task->cred_exec_mutex);
out:
return retval;
}
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 30/58] USB: serial: fix lifetime and locking problems
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (28 preceding siblings ...)
2009-05-06 21:45 ` [patch 29/58] ptrace: ptrace_attach: fix the usage of ->cred_exec_mutex Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:45 ` [patch 31/58] ACPI: Revert conflicting workaround for BIOS w/ mangled PRT entries Greg KH
` (29 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Alan Stern
[-- Attachment #1: usb-serial-fix-lifetime-and-locking-problems.patch --]
[-- Type: text/plain, Size: 8254 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alan Stern <stern@rowland.harvard.edu>
This is commit 2d93148ab6988cad872e65d694c95e8944e1b626 back-ported to
2.6.29.
This patch (as1229-3) fixes a few lifetime and locking problems in the
usb-serial driver. The main symptom is that an invalid kevent is
created when the serial device is unplugged while a connection is
active.
Ports should be unregistered when device is disconnected,
not when the parent usb_serial structure is deallocated.
Each open file should hold a reference to the corresponding
port structure, and the reference should be released when
the file is closed.
serial->disc_mutex should be acquired in serial_open(), to
resolve the classic race between open and disconnect.
serial_close() doesn't need to hold both serial->disc_mutex
and port->mutex at the same time.
Release the subdriver's module reference only after releasing
all the other references, in case one of the release routines
needs to invoke some code in the subdriver module.
Replace a call to flush_scheduled_work() (which is prone to
deadlocks) with cancel_work_sync(). Also, add a call to
cancel_work_sync() in the disconnect routine.
Reduce the scope of serial->disc_mutex in serial_disconnect().
The only place it really needs to protect is where the
"disconnected" flag is set.
Call the shutdown method from within serial_disconnect()
instead of destroy_serial(), because some subdrivers expect
the port data structures still to be in existence when
their shutdown method runs.
This fixes the bug reported in
http://bugs.freedesktop.org/show_bug.cgi?id=20703
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
---
drivers/usb/serial/usb-serial.c | 99 +++++++++++++++++++++++++++-------------
1 file changed, 68 insertions(+), 31 deletions(-)
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -136,22 +136,10 @@ static void destroy_serial(struct kref *
dbg("%s - %s", __func__, serial->type->description);
- serial->type->shutdown(serial);
-
/* return the minor range that this device had */
if (serial->minor != SERIAL_TTY_NO_MINOR)
return_serial(serial);
- for (i = 0; i < serial->num_ports; ++i)
- serial->port[i]->port.count = 0;
-
- /* the ports are cleaned up and released in port_release() */
- for (i = 0; i < serial->num_ports; ++i)
- if (serial->port[i]->dev.parent != NULL) {
- device_unregister(&serial->port[i]->dev);
- serial->port[i] = NULL;
- }
-
/* If this is a "fake" port, we have to clean it up here, as it will
* not get cleaned up in port_release() as it was never registered with
* the driver core */
@@ -186,7 +174,7 @@ static int serial_open (struct tty_struc
struct usb_serial *serial;
struct usb_serial_port *port;
unsigned int portNumber;
- int retval;
+ int retval = 0;
dbg("%s", __func__);
@@ -197,16 +185,24 @@ static int serial_open (struct tty_struc
return -ENODEV;
}
+ mutex_lock(&serial->disc_mutex);
portNumber = tty->index - serial->minor;
port = serial->port[portNumber];
- if (!port) {
+ if (!port || serial->disconnected)
retval = -ENODEV;
- goto bailout_kref_put;
- }
+ else
+ get_device(&port->dev);
+ /*
+ * Note: Our locking order requirement does not allow port->mutex
+ * to be acquired while serial->disc_mutex is held.
+ */
+ mutex_unlock(&serial->disc_mutex);
+ if (retval)
+ goto bailout_serial_put;
if (mutex_lock_interruptible(&port->mutex)) {
retval = -ERESTARTSYS;
- goto bailout_kref_put;
+ goto bailout_port_put;
}
++port->port.count;
@@ -226,14 +222,20 @@ static int serial_open (struct tty_struc
goto bailout_mutex_unlock;
}
- retval = usb_autopm_get_interface(serial->interface);
+ mutex_lock(&serial->disc_mutex);
+ if (serial->disconnected)
+ retval = -ENODEV;
+ else
+ retval = usb_autopm_get_interface(serial->interface);
if (retval)
goto bailout_module_put;
+
/* only call the device specific open if this
* is the first time the port is opened */
retval = serial->type->open(tty, port, filp);
if (retval)
goto bailout_interface_put;
+ mutex_unlock(&serial->disc_mutex);
}
mutex_unlock(&port->mutex);
@@ -242,13 +244,16 @@ static int serial_open (struct tty_struc
bailout_interface_put:
usb_autopm_put_interface(serial->interface);
bailout_module_put:
+ mutex_unlock(&serial->disc_mutex);
module_put(serial->type->driver.owner);
bailout_mutex_unlock:
port->port.count = 0;
tty->driver_data = NULL;
tty_port_tty_set(&port->port, NULL);
mutex_unlock(&port->mutex);
-bailout_kref_put:
+bailout_port_put:
+ put_device(&port->dev);
+bailout_serial_put:
usb_serial_put(serial);
return retval;
}
@@ -256,6 +261,9 @@ bailout_kref_put:
static void serial_close(struct tty_struct *tty, struct file *filp)
{
struct usb_serial_port *port = tty->driver_data;
+ struct usb_serial *serial;
+ struct module *owner;
+ int count;
if (!port)
return;
@@ -263,6 +271,8 @@ static void serial_close(struct tty_stru
dbg("%s - port %d", __func__, port->number);
mutex_lock(&port->mutex);
+ serial = port->serial;
+ owner = serial->type->driver.owner;
if (port->port.count == 0) {
mutex_unlock(&port->mutex);
@@ -275,7 +285,7 @@ static void serial_close(struct tty_stru
* this before we drop the port count. The call is protected
* by the port mutex
*/
- port->serial->type->close(tty, port, filp);
+ serial->type->close(tty, port, filp);
if (port->port.count == (port->console ? 2 : 1)) {
struct tty_struct *tty = tty_port_tty_get(&port->port);
@@ -289,17 +299,23 @@ static void serial_close(struct tty_stru
}
}
- if (port->port.count == 1) {
- mutex_lock(&port->serial->disc_mutex);
- if (!port->serial->disconnected)
- usb_autopm_put_interface(port->serial->interface);
- mutex_unlock(&port->serial->disc_mutex);
- module_put(port->serial->type->driver.owner);
- }
--port->port.count;
-
+ count = port->port.count;
mutex_unlock(&port->mutex);
- usb_serial_put(port->serial);
+ put_device(&port->dev);
+
+ /* Mustn't dereference port any more */
+ if (count == 0) {
+ mutex_lock(&serial->disc_mutex);
+ if (!serial->disconnected)
+ usb_autopm_put_interface(serial->interface);
+ mutex_unlock(&serial->disc_mutex);
+ }
+ usb_serial_put(serial);
+
+ /* Mustn't dereference serial any more */
+ if (count == 0)
+ module_put(owner);
}
static int serial_write(struct tty_struct *tty, const unsigned char *buf,
@@ -548,7 +564,13 @@ static void kill_traffic(struct usb_seri
static void port_free(struct usb_serial_port *port)
{
+ /*
+ * Stop all the traffic before cancelling the work, so that
+ * nobody will restart it by calling usb_serial_port_softint.
+ */
kill_traffic(port);
+ cancel_work_sync(&port->work);
+
usb_free_urb(port->read_urb);
usb_free_urb(port->write_urb);
usb_free_urb(port->interrupt_in_urb);
@@ -557,7 +579,6 @@ static void port_free(struct usb_serial_
kfree(port->bulk_out_buffer);
kfree(port->interrupt_in_buffer);
kfree(port->interrupt_out_buffer);
- flush_scheduled_work(); /* port->work */
kfree(port);
}
@@ -1042,6 +1063,12 @@ void usb_serial_disconnect(struct usb_in
usb_set_intfdata(interface, NULL);
/* must set a flag, to signal subdrivers */
serial->disconnected = 1;
+ mutex_unlock(&serial->disc_mutex);
+
+ /* Unfortunately, many of the sub-drivers expect the port structures
+ * to exist when their shutdown method is called, so we have to go
+ * through this awkward two-step unregistration procedure.
+ */
for (i = 0; i < serial->num_ports; ++i) {
port = serial->port[i];
if (port) {
@@ -1051,11 +1078,21 @@ void usb_serial_disconnect(struct usb_in
tty_kref_put(tty);
}
kill_traffic(port);
+ cancel_work_sync(&port->work);
+ device_del(&port->dev);
}
}
+ serial->type->shutdown(serial);
+ for (i = 0; i < serial->num_ports; ++i) {
+ port = serial->port[i];
+ if (port) {
+ put_device(&port->dev);
+ serial->port[i] = NULL;
+ }
+ }
+
/* let the last holder of this object
* cause it to be cleaned up */
- mutex_unlock(&serial->disc_mutex);
usb_serial_put(serial);
dev_info(dev, "device disconnected\n");
}
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 31/58] ACPI: Revert conflicting workaround for BIOS w/ mangled PRT entries
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (29 preceding siblings ...)
2009-05-06 21:45 ` [patch 30/58] USB: serial: fix lifetime and locking problems Greg KH
@ 2009-05-06 21:45 ` Greg KH
2009-05-06 21:46 ` [patch 32/58] powerpc: Sanitize stack pointer in signal handling code Greg KH
` (28 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:45 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, linux-acpi, tmb, Zhang Rui, Len Brown
[-- Attachment #1: acpi-revert-conflicting-workaround-for-bios-w-mangled-prt-entries.patch --]
[-- Type: text/plain, Size: 2766 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Zhang Rui <rui.zhang@intel.com>
upstream 82babbb3887e234c995626e4121d411ea9070ca5
backported to 2.6.29.2
2f894ef9c8b36a35d80709bedca276d2fc691941
in Linux-2.6.21 worked around BIOS with mangled _PRT entries:
http://bugzilla.kernel.org/show_bug.cgi?id=6859
d0e184abc5983281ef189db2c759d65d56eb1b80
worked around the same issue via ACPICA, and shipped in 2.6.27.
Unfortunately the two workarounds conflict:
http://bugzilla.kernel.org/show_bug.cgi?id=12270
So revert the Linux specific one.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/acpi/acpica/rscreate.c | 27 ++-------------------------
1 file changed, 2 insertions(+), 25 deletions(-)
--- a/drivers/acpi/acpica/rscreate.c
+++ b/drivers/acpi/acpica/rscreate.c
@@ -191,8 +191,6 @@ acpi_rs_create_pci_routing_table(union a
user_prt = ACPI_CAST_PTR(struct acpi_pci_routing_table, buffer);
for (index = 0; index < number_of_elements; index++) {
- int source_name_index = 2;
- int source_index_index = 3;
/*
* Point user_prt past this current structure
@@ -261,27 +259,6 @@ acpi_rs_create_pci_routing_table(union a
return_ACPI_STATUS(AE_BAD_DATA);
}
- /*
- * If BIOS erroneously reversed the _PRT source_name and source_index,
- * then reverse them back.
- */
- if (ACPI_GET_OBJECT_TYPE(sub_object_list[3]) !=
- ACPI_TYPE_INTEGER) {
- if (acpi_gbl_enable_interpreter_slack) {
- source_name_index = 3;
- source_index_index = 2;
- printk(KERN_WARNING
- "ACPI: Handling Garbled _PRT entry\n");
- } else {
- ACPI_ERROR((AE_INFO,
- "(PRT[%X].source_index) Need Integer, found %s",
- index,
- acpi_ut_get_object_type_name
- (sub_object_list[3])));
- return_ACPI_STATUS(AE_BAD_DATA);
- }
- }
-
user_prt->pin = (u32) obj_desc->integer.value;
/*
@@ -305,7 +282,7 @@ acpi_rs_create_pci_routing_table(union a
* 3) Third subobject: Dereference the PRT.source_name
* The name may be unresolved (slack mode), so allow a null object
*/
- obj_desc = sub_object_list[source_name_index];
+ obj_desc = sub_object_list[2];
if (obj_desc) {
switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
case ACPI_TYPE_LOCAL_REFERENCE:
@@ -379,7 +356,7 @@ acpi_rs_create_pci_routing_table(union a
/* 4) Fourth subobject: Dereference the PRT.source_index */
- obj_desc = sub_object_list[source_index_index];
+ obj_desc = sub_object_list[3];
if (ACPI_GET_OBJECT_TYPE(obj_desc) != ACPI_TYPE_INTEGER) {
ACPI_ERROR((AE_INFO,
"(PRT[%X].SourceIndex) Need Integer, found %s",
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 32/58] powerpc: Sanitize stack pointer in signal handling code
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (30 preceding siblings ...)
2009-05-06 21:45 ` [patch 31/58] ACPI: Revert conflicting workaround for BIOS w/ mangled PRT entries Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 21:46 ` [patch 33/58] compat_do_execve should unshare_files Greg KH
` (27 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, benh, Josh Boyer
[-- Attachment #1: powerpc-sanitize-stack-pointer-in-signal-handling-code.patch --]
[-- Type: text/plain, Size: 3994 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Josh Boyer <jwboyer@linux.vnet.ibm.com>
This has been backported to 2.6.29.x from commit efbda86098 in Linus' tree
On powerpc64 machines running 32-bit userspace, we can get garbage bits in the
stack pointer passed into the kernel. Most places handle this correctly, but
the signal handling code uses the passed value directly for allocating signal
stack frames.
This fixes the issue by introducing a get_clean_sp function that returns a
sanitized stack pointer. For 32-bit tasks on a 64-bit kernel, the stack
pointer is masked correctly. In all other cases, the stack pointer is simply
returned.
Additionally, we pass an 'is_32' parameter to get_sigframe now in order to
get the properly sanitized stack. The callers are know to be 32 or 64-bit
statically.
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/powerpc/include/asm/processor.h | 19 +++++++++++++++++++
arch/powerpc/kernel/signal.c | 4 ++--
arch/powerpc/kernel/signal.h | 2 +-
arch/powerpc/kernel/signal_32.c | 4 ++--
arch/powerpc/kernel/signal_64.c | 2 +-
5 files changed, 25 insertions(+), 6 deletions(-)
--- a/arch/powerpc/include/asm/processor.h
+++ b/arch/powerpc/include/asm/processor.h
@@ -313,6 +313,25 @@ static inline void prefetchw(const void
#define HAVE_ARCH_PICK_MMAP_LAYOUT
#endif
+#ifdef CONFIG_PPC64
+static inline unsigned long get_clean_sp(struct pt_regs *regs, int is_32)
+{
+ unsigned long sp;
+
+ if (is_32)
+ sp = regs->gpr[1] & 0x0ffffffffUL;
+ else
+ sp = regs->gpr[1];
+
+ return sp;
+}
+#else
+static inline unsigned long get_clean_sp(struct pt_regs *regs, int is_32)
+{
+ return regs->gpr[1];
+}
+#endif
+
#endif /* __KERNEL__ */
#endif /* __ASSEMBLY__ */
#endif /* _ASM_POWERPC_PROCESSOR_H */
--- a/arch/powerpc/kernel/signal_32.c
+++ b/arch/powerpc/kernel/signal_32.c
@@ -836,7 +836,7 @@ int handle_rt_signal32(unsigned long sig
/* Set up Signal Frame */
/* Put a Real Time Context onto stack */
- rt_sf = get_sigframe(ka, regs, sizeof(*rt_sf));
+ rt_sf = get_sigframe(ka, regs, sizeof(*rt_sf), 1);
addr = rt_sf;
if (unlikely(rt_sf == NULL))
goto badframe;
@@ -1182,7 +1182,7 @@ int handle_signal32(unsigned long sig, s
unsigned long newsp = 0;
/* Set up Signal Frame */
- frame = get_sigframe(ka, regs, sizeof(*frame));
+ frame = get_sigframe(ka, regs, sizeof(*frame), 1);
if (unlikely(frame == NULL))
goto badframe;
sc = (struct sigcontext __user *) &frame->sctx;
--- a/arch/powerpc/kernel/signal_64.c
+++ b/arch/powerpc/kernel/signal_64.c
@@ -402,7 +402,7 @@ int handle_rt_signal64(int signr, struct
unsigned long newsp = 0;
long err = 0;
- frame = get_sigframe(ka, regs, sizeof(*frame));
+ frame = get_sigframe(ka, regs, sizeof(*frame), 0);
if (unlikely(frame == NULL))
goto badframe;
--- a/arch/powerpc/kernel/signal.c
+++ b/arch/powerpc/kernel/signal.c
@@ -26,12 +26,12 @@ int show_unhandled_signals = 0;
* Allocate space for the signal frame
*/
void __user * get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
- size_t frame_size)
+ size_t frame_size, int is_32)
{
unsigned long oldsp, newsp;
/* Default to using normal stack */
- oldsp = regs->gpr[1];
+ oldsp = get_clean_sp(regs, is_32);
/* Check for alt stack */
if ((ka->sa.sa_flags & SA_ONSTACK) &&
--- a/arch/powerpc/kernel/signal.h
+++ b/arch/powerpc/kernel/signal.h
@@ -15,7 +15,7 @@
extern void do_signal(struct pt_regs *regs, unsigned long thread_info_flags);
extern void __user * get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
- size_t frame_size);
+ size_t frame_size, int is_32);
extern void restore_sigmask(sigset_t *set);
extern int handle_signal32(unsigned long sig, struct k_sigaction *ka,
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 33/58] compat_do_execve should unshare_files
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (31 preceding siblings ...)
2009-05-06 21:46 ` [patch 32/58] powerpc: Sanitize stack pointer in signal handling code Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 21:46 ` [patch 34/58] fix setuid sometimes doesnt Greg KH
` (26 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Hugh Dickins
[-- Attachment #1: compat_do_execve-should-unshare_files.patch --]
[-- Type: text/plain, Size: 1967 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Hugh Dickins <hugh@veritas.com>
commit 53e9309e01277ec99c38e84e0ca16921287cf470 upstream.
2.6.26's commit fd8328be874f4190a811c58cd4778ec2c74d2c05
"sanitize handling of shared descriptor tables in failing execve()"
moved the unshare_files() from flush_old_exec() and several binfmts
to the head of do_execve(); but forgot to make the same change to
compat_do_execve(), leaving a CLONE_FILES files_struct shared across
exec from a 32-bit process on a 64-bit kernel.
It's arguable whether the files_struct really ought to be unshared
across exec; but 2.6.1 made that so to stop the loading binary's fd
leaking into other threads, and a 32-bit process on a 64-bit kernel
ought to behave in the same way as 32 on 32 and 64 on 64.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/compat.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -1392,12 +1392,17 @@ int compat_do_execve(char * filename,
{
struct linux_binprm *bprm;
struct file *file;
+ struct files_struct *displaced;
int retval;
+ retval = unshare_files(&displaced);
+ if (retval)
+ goto out_ret;
+
retval = -ENOMEM;
bprm = kzalloc(sizeof(*bprm), GFP_KERNEL);
if (!bprm)
- goto out_ret;
+ goto out_files;
retval = mutex_lock_interruptible(¤t->cred_exec_mutex);
if (retval < 0)
@@ -1457,6 +1462,8 @@ int compat_do_execve(char * filename,
mutex_unlock(¤t->cred_exec_mutex);
acct_update_integrals(current);
free_bprm(bprm);
+ if (displaced)
+ put_files_struct(displaced);
return retval;
out:
@@ -1475,6 +1482,9 @@ out_unlock:
out_free:
free_bprm(bprm);
+out_files:
+ if (displaced)
+ reset_files_struct(displaced);
out_ret:
return retval;
}
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 34/58] fix setuid sometimes doesnt
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (32 preceding siblings ...)
2009-05-06 21:46 ` [patch 33/58] compat_do_execve should unshare_files Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 21:46 ` [patch 35/58] fix setuid sometimes wouldnt Greg KH
` (25 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Hugh Dickins
[-- Attachment #1: fix-setuid-sometimes-doesn-t.patch --]
[-- Type: text/plain, Size: 3261 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Hugh Dickins <hugh@veritas.com>
commit e426b64c412aaa3e9eb3e4b261dc5be0d5a83e78 upstream.
Joe Malicki reports that setuid sometimes doesn't: very rarely,
a setuid root program does not get root euid; and, by the way,
they have a health check running lsof every few minutes.
Right, check_unsafe_exec() notes whether the files_struct is being
shared by more threads than will get killed by the exec, and if so
sets LSM_UNSAFE_SHARE to make bprm_set_creds() careful about euid.
But /proc/<pid>/fd and /proc/<pid>/fdinfo lookups make transient
use of get_files_struct(), which also raises that sharing count.
There's a rather simple fix for this: exec's check on files->count
has been redundant ever since 2.6.1 made it unshare_files() (except
while compat_do_execve() omitted to do so) - just remove that check.
[Note to -stable: this patch will not apply before 2.6.29: earlier
releases should just remove the files->count line from unsafe_exec().]
Reported-by: Joe Malicki <jmalicki@metacarta.com>
Narrowed-down-by: Michael Itz <mitz@metacarta.com>
Tested-by: Joe Malicki <jmalicki@metacarta.com>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/compat.c | 2 +-
fs/exec.c | 10 +++-------
fs/internal.h | 2 +-
3 files changed, 5 insertions(+), 9 deletions(-)
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -1412,7 +1412,7 @@ int compat_do_execve(char * filename,
bprm->cred = prepare_exec_creds();
if (!bprm->cred)
goto out_unlock;
- check_unsafe_exec(bprm, current->files);
+ check_unsafe_exec(bprm);
file = open_exec(filename);
retval = PTR_ERR(file);
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1049,28 +1049,24 @@ EXPORT_SYMBOL(install_exec_creds);
* - the caller must hold current->cred_exec_mutex to protect against
* PTRACE_ATTACH
*/
-void check_unsafe_exec(struct linux_binprm *bprm, struct files_struct *files)
+void check_unsafe_exec(struct linux_binprm *bprm)
{
struct task_struct *p = current, *t;
unsigned long flags;
- unsigned n_fs, n_files, n_sighand;
+ unsigned n_fs, n_sighand;
bprm->unsafe = tracehook_unsafe_exec(p);
n_fs = 1;
- n_files = 1;
n_sighand = 1;
lock_task_sighand(p, &flags);
for (t = next_thread(p); t != p; t = next_thread(t)) {
if (t->fs == p->fs)
n_fs++;
- if (t->files == files)
- n_files++;
n_sighand++;
}
if (atomic_read(&p->fs->count) > n_fs ||
- atomic_read(&p->files->count) > n_files ||
atomic_read(&p->sighand->count) > n_sighand)
bprm->unsafe |= LSM_UNSAFE_SHARE;
@@ -1289,7 +1285,7 @@ int do_execve(char * filename,
bprm->cred = prepare_exec_creds();
if (!bprm->cred)
goto out_unlock;
- check_unsafe_exec(bprm, displaced);
+ check_unsafe_exec(bprm);
file = open_exec(filename);
retval = PTR_ERR(file);
--- a/fs/internal.h
+++ b/fs/internal.h
@@ -43,7 +43,7 @@ extern void __init chrdev_init(void);
/*
* exec.c
*/
-extern void check_unsafe_exec(struct linux_binprm *, struct files_struct *);
+extern void check_unsafe_exec(struct linux_binprm *);
/*
* namespace.c
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 35/58] fix setuid sometimes wouldnt
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (33 preceding siblings ...)
2009-05-06 21:46 ` [patch 34/58] fix setuid sometimes doesnt Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 21:46 ` [patch 36/58] Annotate struct fs_structs usage count restriction Greg KH
` (24 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Hugh Dickins
[-- Attachment #1: fix-setuid-sometimes-wouldn-t.patch --]
[-- Type: text/plain, Size: 3567 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Hugh Dickins <hugh@veritas.com>
commit 7c2c7d993044cddc5010f6f429b100c63bc7dffb upstream.
check_unsafe_exec() also notes whether the fs_struct is being
shared by more threads than will get killed by the exec, and if so
sets LSM_UNSAFE_SHARE to make bprm_set_creds() careful about euid.
But /proc/<pid>/cwd and /proc/<pid>/root lookups make transient
use of get_fs_struct(), which also raises that sharing count.
This might occasionally cause a setuid program not to change euid,
in the same way as happened with files->count (check_unsafe_exec
also looks at sighand->count, but /proc doesn't raise that one).
We'd prefer exec not to unshare fs_struct: so fix this in procfs,
replacing get_fs_struct() by get_fs_path(), which does path_get
while still holding task_lock, instead of raising fs->count.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/proc/base.c | 50 ++++++++++++++++----------------------------------
1 file changed, 16 insertions(+), 34 deletions(-)
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -146,15 +146,22 @@ static unsigned int pid_entry_count_dirs
return count;
}
-static struct fs_struct *get_fs_struct(struct task_struct *task)
+static int get_fs_path(struct task_struct *task, struct path *path, bool root)
{
struct fs_struct *fs;
+ int result = -ENOENT;
+
task_lock(task);
fs = task->fs;
- if(fs)
- atomic_inc(&fs->count);
+ if (fs) {
+ read_lock(&fs->lock);
+ *path = root ? fs->root : fs->pwd;
+ path_get(path);
+ read_unlock(&fs->lock);
+ result = 0;
+ }
task_unlock(task);
- return fs;
+ return result;
}
static int get_nr_threads(struct task_struct *tsk)
@@ -172,42 +179,24 @@ static int get_nr_threads(struct task_st
static int proc_cwd_link(struct inode *inode, struct path *path)
{
struct task_struct *task = get_proc_task(inode);
- struct fs_struct *fs = NULL;
int result = -ENOENT;
if (task) {
- fs = get_fs_struct(task);
+ result = get_fs_path(task, path, 0);
put_task_struct(task);
}
- if (fs) {
- read_lock(&fs->lock);
- *path = fs->pwd;
- path_get(&fs->pwd);
- read_unlock(&fs->lock);
- result = 0;
- put_fs_struct(fs);
- }
return result;
}
static int proc_root_link(struct inode *inode, struct path *path)
{
struct task_struct *task = get_proc_task(inode);
- struct fs_struct *fs = NULL;
int result = -ENOENT;
if (task) {
- fs = get_fs_struct(task);
+ result = get_fs_path(task, path, 1);
put_task_struct(task);
}
- if (fs) {
- read_lock(&fs->lock);
- *path = fs->root;
- path_get(&fs->root);
- read_unlock(&fs->lock);
- result = 0;
- put_fs_struct(fs);
- }
return result;
}
@@ -596,7 +585,6 @@ static int mounts_open_common(struct ino
struct task_struct *task = get_proc_task(inode);
struct nsproxy *nsp;
struct mnt_namespace *ns = NULL;
- struct fs_struct *fs = NULL;
struct path root;
struct proc_mounts *p;
int ret = -EINVAL;
@@ -610,22 +598,16 @@ static int mounts_open_common(struct ino
get_mnt_ns(ns);
}
rcu_read_unlock();
- if (ns)
- fs = get_fs_struct(task);
+ if (ns && get_fs_path(task, &root, 1) == 0)
+ ret = 0;
put_task_struct(task);
}
if (!ns)
goto err;
- if (!fs)
+ if (ret)
goto err_put_ns;
- read_lock(&fs->lock);
- root = fs->root;
- path_get(&root);
- read_unlock(&fs->lock);
- put_fs_struct(fs);
-
ret = -ENOMEM;
p = kmalloc(sizeof(struct proc_mounts), GFP_KERNEL);
if (!p)
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 36/58] Annotate struct fs_structs usage count restriction
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (34 preceding siblings ...)
2009-05-06 21:46 ` [patch 35/58] fix setuid sometimes wouldnt Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 21:46 ` [patch 37/58] Kill unsharing fs_struct in __set_personality() Greg KH
` (23 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, David Howells, Hugh Dickins
[-- Attachment #1: annotate-struct-fs_struct-s-usage-count-restriction.patch --]
[-- Type: text/plain, Size: 1116 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: David Howells <dhowells@redhat.com>
commit 795e2fe0a3b69dbc040d7efcf517e0cbad6901d0 upstream.
Annotate struct fs_struct's usage count to indicate the restrictions upon it.
It may not be incremented, except by clone(CLONE_FS), as this affects the
check in check_unsafe_exec() in fs/exec.c.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/linux/fs_struct.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/include/linux/fs_struct.h
+++ b/include/linux/fs_struct.h
@@ -4,7 +4,10 @@
#include <linux/path.h>
struct fs_struct {
- atomic_t count;
+ atomic_t count; /* This usage count is used by check_unsafe_exec() for
+ * security checking purposes - therefore it may not be
+ * incremented, except by clone(CLONE_FS).
+ */
rwlock_t lock;
int umask;
struct path root, pwd;
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 37/58] Kill unsharing fs_struct in __set_personality()
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (35 preceding siblings ...)
2009-05-06 21:46 ` [patch 36/58] Annotate struct fs_structs usage count restriction Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 21:46 ` [patch 38/58] Get rid of bumping fs_struct refcount in pivot_root(2) Greg KH
` (22 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Al Viro
[-- Attachment #1: kill-unsharing-fs_struct-in-__set_personality.patch --]
[-- Type: text/plain, Size: 1061 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Al Viro <viro@zeniv.linux.org.uk>
commit 11d06b2a1e5658f448a308aa3beb97bacd64a940 upstream.
That's a rudiment of altroot support. I.e. it should've been buried
a long time ago.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/kernel/exec_domain.c
+++ b/kernel/exec_domain.c
@@ -145,28 +145,6 @@ __set_personality(u_long personality)
return 0;
}
- if (atomic_read(¤t->fs->count) != 1) {
- struct fs_struct *fsp, *ofsp;
-
- fsp = copy_fs_struct(current->fs);
- if (fsp == NULL) {
- module_put(ep->module);
- return -ENOMEM;
- }
-
- task_lock(current);
- ofsp = current->fs;
- current->fs = fsp;
- task_unlock(current);
-
- put_fs_struct(ofsp);
- }
-
- /*
- * At that point we are guaranteed to be the sole owner of
- * current->fs.
- */
-
current->personality = personality;
oep = current_thread_info()->exec_domain;
current_thread_info()->exec_domain = ep;
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 38/58] Get rid of bumping fs_struct refcount in pivot_root(2)
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (36 preceding siblings ...)
2009-05-06 21:46 ` [patch 37/58] Kill unsharing fs_struct in __set_personality() Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 21:46 ` [patch 39/58] Take fs_struct handling to new file (fs/fs_struct.c) Greg KH
` (21 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Al Viro
[-- Attachment #1: get-rid-of-bumping-fs_struct-refcount-in-pivot_root.patch --]
[-- Type: text/plain, Size: 1618 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Al Viro <viro@zeniv.linux.org.uk>
commit f8ef3ed2bebd2c4cb9ece92efa185d7aead8831a upstream.
Not because execve races with _that_ are serious - we really
need a situation when final drop of fs_struct refcount is
done by something that used to have it as current->fs.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/namespace.c | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2127,25 +2127,33 @@ static void chroot_fs_refs(struct path *
{
struct task_struct *g, *p;
struct fs_struct *fs;
+ int count = 0;
read_lock(&tasklist_lock);
do_each_thread(g, p) {
task_lock(p);
fs = p->fs;
if (fs) {
- atomic_inc(&fs->count);
- task_unlock(p);
+ write_lock(&fs->lock);
if (fs->root.dentry == old_root->dentry
- && fs->root.mnt == old_root->mnt)
- set_fs_root(fs, new_root);
+ && fs->root.mnt == old_root->mnt) {
+ path_get(new_root);
+ fs->root = *new_root;
+ count++;
+ }
if (fs->pwd.dentry == old_root->dentry
- && fs->pwd.mnt == old_root->mnt)
- set_fs_pwd(fs, new_root);
- put_fs_struct(fs);
- } else
- task_unlock(p);
+ && fs->pwd.mnt == old_root->mnt) {
+ path_get(new_root);
+ fs->pwd = *new_root;
+ count++;
+ }
+ write_unlock(&fs->lock);
+ }
+ task_unlock(p);
} while_each_thread(g, p);
read_unlock(&tasklist_lock);
+ while (count--)
+ path_put(old_root);
}
/*
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 39/58] Take fs_struct handling to new file (fs/fs_struct.c)
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (37 preceding siblings ...)
2009-05-06 21:46 ` [patch 38/58] Get rid of bumping fs_struct refcount in pivot_root(2) Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 21:46 ` [patch 40/58] New locking/refcounting for fs_struct Greg KH
` (20 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Al Viro
[-- Attachment #1: take-fs_struct-handling-to-new-file.patch --]
[-- Type: text/plain, Size: 10530 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Al Viro <viro@zeniv.linux.org.uk>
commit 3e93cd671813e204c258f1e6c797959920cf7772 upstream.
Pure code move; two new helper functions for nfsd and daemonize
(unshare_fs_struct() and daemonize_fs_struct() resp.; for now -
the same code as used to be in callers). unshare_fs_struct()
exported (for nfsd, as copy_fs_struct()/exit_fs() used to be),
copy_fs_struct() and exit_fs() don't need exports anymore.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/Makefile | 2
fs/fs_struct.c | 141 ++++++++++++++++++++++++++++++++++++++++++++++
fs/internal.h | 6 +
fs/namei.c | 7 --
fs/namespace.c | 68 ----------------------
fs/nfsd/nfssvc.c | 7 --
include/linux/fs_struct.h | 2
kernel/exit.c | 31 ----------
kernel/fork.c | 29 ---------
9 files changed, 155 insertions(+), 138 deletions(-)
--- /dev/null
+++ b/fs/fs_struct.c
@@ -0,0 +1,141 @@
+#include <linux/module.h>
+#include <linux/sched.h>
+#include <linux/fs.h>
+#include <linux/path.h>
+#include <linux/slab.h>
+
+/*
+ * Replace the fs->{rootmnt,root} with {mnt,dentry}. Put the old values.
+ * It can block.
+ */
+void set_fs_root(struct fs_struct *fs, struct path *path)
+{
+ struct path old_root;
+
+ write_lock(&fs->lock);
+ old_root = fs->root;
+ fs->root = *path;
+ path_get(path);
+ write_unlock(&fs->lock);
+ if (old_root.dentry)
+ path_put(&old_root);
+}
+
+/*
+ * Replace the fs->{pwdmnt,pwd} with {mnt,dentry}. Put the old values.
+ * It can block.
+ */
+void set_fs_pwd(struct fs_struct *fs, struct path *path)
+{
+ struct path old_pwd;
+
+ write_lock(&fs->lock);
+ old_pwd = fs->pwd;
+ fs->pwd = *path;
+ path_get(path);
+ write_unlock(&fs->lock);
+
+ if (old_pwd.dentry)
+ path_put(&old_pwd);
+}
+
+void chroot_fs_refs(struct path *old_root, struct path *new_root)
+{
+ struct task_struct *g, *p;
+ struct fs_struct *fs;
+ int count = 0;
+
+ read_lock(&tasklist_lock);
+ do_each_thread(g, p) {
+ task_lock(p);
+ fs = p->fs;
+ if (fs) {
+ write_lock(&fs->lock);
+ if (fs->root.dentry == old_root->dentry
+ && fs->root.mnt == old_root->mnt) {
+ path_get(new_root);
+ fs->root = *new_root;
+ count++;
+ }
+ if (fs->pwd.dentry == old_root->dentry
+ && fs->pwd.mnt == old_root->mnt) {
+ path_get(new_root);
+ fs->pwd = *new_root;
+ count++;
+ }
+ write_unlock(&fs->lock);
+ }
+ task_unlock(p);
+ } while_each_thread(g, p);
+ read_unlock(&tasklist_lock);
+ while (count--)
+ path_put(old_root);
+}
+
+void put_fs_struct(struct fs_struct *fs)
+{
+ /* No need to hold fs->lock if we are killing it */
+ if (atomic_dec_and_test(&fs->count)) {
+ path_put(&fs->root);
+ path_put(&fs->pwd);
+ kmem_cache_free(fs_cachep, fs);
+ }
+}
+
+void exit_fs(struct task_struct *tsk)
+{
+ struct fs_struct * fs = tsk->fs;
+
+ if (fs) {
+ task_lock(tsk);
+ tsk->fs = NULL;
+ task_unlock(tsk);
+ put_fs_struct(fs);
+ }
+}
+
+struct fs_struct *copy_fs_struct(struct fs_struct *old)
+{
+ struct fs_struct *fs = kmem_cache_alloc(fs_cachep, GFP_KERNEL);
+ /* We don't need to lock fs - think why ;-) */
+ if (fs) {
+ atomic_set(&fs->count, 1);
+ rwlock_init(&fs->lock);
+ fs->umask = old->umask;
+ read_lock(&old->lock);
+ fs->root = old->root;
+ path_get(&old->root);
+ fs->pwd = old->pwd;
+ path_get(&old->pwd);
+ read_unlock(&old->lock);
+ }
+ return fs;
+}
+
+int unshare_fs_struct(void)
+{
+ struct fs_struct *fsp = copy_fs_struct(current->fs);
+ if (!fsp)
+ return -ENOMEM;
+ exit_fs(current);
+ current->fs = fsp;
+ return 0;
+}
+EXPORT_SYMBOL_GPL(unshare_fs_struct);
+
+/* to be mentioned only in INIT_TASK */
+struct fs_struct init_fs = {
+ .count = ATOMIC_INIT(1),
+ .lock = __RW_LOCK_UNLOCKED(init_fs.lock),
+ .umask = 0022,
+};
+
+void daemonize_fs_struct(void)
+{
+ struct fs_struct *fs;
+
+ exit_fs(current); /* current->fs->count--; */
+ fs = &init_fs;
+ current->fs = fs;
+ atomic_inc(&fs->count);
+}
--- a/fs/internal.h
+++ b/fs/internal.h
@@ -11,6 +11,7 @@
struct super_block;
struct linux_binprm;
+struct path;
/*
* block_dev.c
@@ -60,3 +61,8 @@ extern void umount_tree(struct vfsmount
extern struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int);
extern void __init mnt_init(void);
+
+/*
+ * fs_struct.c
+ */
+extern void chroot_fs_refs(struct path *, struct path *);
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -11,7 +11,7 @@ obj-y := open.o read_write.o file_table.
attr.o bad_inode.o file.o filesystems.o namespace.o \
seq_file.o xattr.o libfs.o fs-writeback.o \
pnode.o drop_caches.o splice.o sync.o utimes.o \
- stack.o
+ stack.o fs_struct.o
ifeq ($(CONFIG_BLOCK),y)
obj-y += buffer.o bio.o block_dev.o direct-io.o mpage.o ioprio.o
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2891,10 +2891,3 @@ EXPORT_SYMBOL(vfs_symlink);
EXPORT_SYMBOL(vfs_unlink);
EXPORT_SYMBOL(dentry_unhash);
EXPORT_SYMBOL(generic_readlink);
-
-/* to be mentioned only in INIT_TASK */
-struct fs_struct init_fs = {
- .count = ATOMIC_INIT(1),
- .lock = __RW_LOCK_UNLOCKED(init_fs.lock),
- .umask = 0022,
-};
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2089,74 +2089,6 @@ out1:
}
/*
- * Replace the fs->{rootmnt,root} with {mnt,dentry}. Put the old values.
- * It can block. Requires the big lock held.
- */
-void set_fs_root(struct fs_struct *fs, struct path *path)
-{
- struct path old_root;
-
- write_lock(&fs->lock);
- old_root = fs->root;
- fs->root = *path;
- path_get(path);
- write_unlock(&fs->lock);
- if (old_root.dentry)
- path_put(&old_root);
-}
-
-/*
- * Replace the fs->{pwdmnt,pwd} with {mnt,dentry}. Put the old values.
- * It can block. Requires the big lock held.
- */
-void set_fs_pwd(struct fs_struct *fs, struct path *path)
-{
- struct path old_pwd;
-
- write_lock(&fs->lock);
- old_pwd = fs->pwd;
- fs->pwd = *path;
- path_get(path);
- write_unlock(&fs->lock);
-
- if (old_pwd.dentry)
- path_put(&old_pwd);
-}
-
-static void chroot_fs_refs(struct path *old_root, struct path *new_root)
-{
- struct task_struct *g, *p;
- struct fs_struct *fs;
- int count = 0;
-
- read_lock(&tasklist_lock);
- do_each_thread(g, p) {
- task_lock(p);
- fs = p->fs;
- if (fs) {
- write_lock(&fs->lock);
- if (fs->root.dentry == old_root->dentry
- && fs->root.mnt == old_root->mnt) {
- path_get(new_root);
- fs->root = *new_root;
- count++;
- }
- if (fs->pwd.dentry == old_root->dentry
- && fs->pwd.mnt == old_root->mnt) {
- path_get(new_root);
- fs->pwd = *new_root;
- count++;
- }
- write_unlock(&fs->lock);
- }
- task_unlock(p);
- } while_each_thread(g, p);
- read_unlock(&tasklist_lock);
- while (count--)
- path_put(old_root);
-}
-
-/*
* pivot_root Semantics:
* Moves the root file system of the current process to the directory put_old,
* makes new_root as the new root file system of the current process, and sets
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -404,7 +404,6 @@ static int
nfsd(void *vrqstp)
{
struct svc_rqst *rqstp = (struct svc_rqst *) vrqstp;
- struct fs_struct *fsp;
int err, preverr = 0;
/* Lock module and set up kernel thread */
@@ -413,13 +412,11 @@ nfsd(void *vrqstp)
/* At this point, the thread shares current->fs
* with the init process. We need to create files with a
* umask of 0 instead of init's umask. */
- fsp = copy_fs_struct(current->fs);
- if (!fsp) {
+ if (unshare_fs_struct() < 0) {
printk("Unable to start nfsd thread: out of memory\n");
goto out;
}
- exit_fs(current);
- current->fs = fsp;
+
current->fs->umask = 0;
/*
--- a/include/linux/fs_struct.h
+++ b/include/linux/fs_struct.h
@@ -20,5 +20,7 @@ extern void set_fs_root(struct fs_struct
extern void set_fs_pwd(struct fs_struct *, struct path *);
extern struct fs_struct *copy_fs_struct(struct fs_struct *);
extern void put_fs_struct(struct fs_struct *);
+extern void daemonize_fs_struct(void);
+extern int unshare_fs_struct(void);
#endif /* _LINUX_FS_STRUCT_H */
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -429,7 +429,6 @@ EXPORT_SYMBOL(disallow_signal);
void daemonize(const char *name, ...)
{
va_list args;
- struct fs_struct *fs;
sigset_t blocked;
va_start(args, name);
@@ -462,11 +461,7 @@ void daemonize(const char *name, ...)
/* Become as one with the init task */
- exit_fs(current); /* current->fs->count--; */
- fs = init_task.fs;
- current->fs = fs;
- atomic_inc(&fs->count);
-
+ daemonize_fs_struct();
exit_files(current);
current->files = init_task.files;
atomic_inc(¤t->files->count);
@@ -565,30 +560,6 @@ void exit_files(struct task_struct *tsk)
}
}
-void put_fs_struct(struct fs_struct *fs)
-{
- /* No need to hold fs->lock if we are killing it */
- if (atomic_dec_and_test(&fs->count)) {
- path_put(&fs->root);
- path_put(&fs->pwd);
- kmem_cache_free(fs_cachep, fs);
- }
-}
-
-void exit_fs(struct task_struct *tsk)
-{
- struct fs_struct * fs = tsk->fs;
-
- if (fs) {
- task_lock(tsk);
- tsk->fs = NULL;
- task_unlock(tsk);
- put_fs_struct(fs);
- }
-}
-
-EXPORT_SYMBOL_GPL(exit_fs);
-
#ifdef CONFIG_MM_OWNER
/*
* Task p is exiting and it owned mm, lets find a new owner for it
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -676,38 +676,13 @@ fail_nomem:
return retval;
}
-static struct fs_struct *__copy_fs_struct(struct fs_struct *old)
-{
- struct fs_struct *fs = kmem_cache_alloc(fs_cachep, GFP_KERNEL);
- /* We don't need to lock fs - think why ;-) */
- if (fs) {
- atomic_set(&fs->count, 1);
- rwlock_init(&fs->lock);
- fs->umask = old->umask;
- read_lock(&old->lock);
- fs->root = old->root;
- path_get(&old->root);
- fs->pwd = old->pwd;
- path_get(&old->pwd);
- read_unlock(&old->lock);
- }
- return fs;
-}
-
-struct fs_struct *copy_fs_struct(struct fs_struct *old)
-{
- return __copy_fs_struct(old);
-}
-
-EXPORT_SYMBOL_GPL(copy_fs_struct);
-
static int copy_fs(unsigned long clone_flags, struct task_struct *tsk)
{
if (clone_flags & CLONE_FS) {
atomic_inc(¤t->fs->count);
return 0;
}
- tsk->fs = __copy_fs_struct(current->fs);
+ tsk->fs = copy_fs_struct(current->fs);
if (!tsk->fs)
return -ENOMEM;
return 0;
@@ -1545,7 +1520,7 @@ static int unshare_fs(unsigned long unsh
if ((unshare_flags & CLONE_FS) &&
(fs && atomic_read(&fs->count) > 1)) {
- *new_fsp = __copy_fs_struct(current->fs);
+ *new_fsp = copy_fs_struct(current->fs);
if (!*new_fsp)
return -ENOMEM;
}
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 40/58] New locking/refcounting for fs_struct
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (38 preceding siblings ...)
2009-05-06 21:46 ` [patch 39/58] Take fs_struct handling to new file (fs/fs_struct.c) Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 21:46 ` [patch 41/58] check_unsafe_exec() doesnt care about signal handlers sharing Greg KH
` (19 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Al Viro
[-- Attachment #1: new-locking-refcounting-for-fs_struct.patch --]
[-- Type: text/plain, Size: 9847 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Al Viro <viro@zeniv.linux.org.uk>
commit 498052bba55ecaff58db6a1436b0e25bfd75a7ff upstream.
* all changes of current->fs are done under task_lock and write_lock of
old fs->lock
* refcount is not atomic anymore (same protection)
* its decrements are done when removing reference from current; at the
same time we decide whether to free it.
* put_fs_struct() is gone
* new field - ->in_exec. Set by check_unsafe_exec() if we are trying to do
execve() and only subthreads share fs_struct. Cleared when finishing exec
(success and failure alike). Makes CLONE_FS fail with -EAGAIN if set.
* check_unsafe_exec() may fail with -EAGAIN if another execve() from subthread
is in progress.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/compat.c | 16 +++++++++-
fs/exec.c | 31 +++++++++++++++++---
fs/fs_struct.c | 69 ++++++++++++++++++++++++++++++++--------------
fs/internal.h | 2 -
fs/proc/task_nommu.c | 2 -
include/linux/fs_struct.h | 8 ++---
kernel/fork.c | 37 ++++++++++++++++++------
7 files changed, 121 insertions(+), 44 deletions(-)
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -51,6 +51,7 @@
#include <linux/poll.h>
#include <linux/mm.h>
#include <linux/eventpoll.h>
+#include <linux/fs_struct.h>
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
@@ -1412,12 +1413,15 @@ int compat_do_execve(char * filename,
bprm->cred = prepare_exec_creds();
if (!bprm->cred)
goto out_unlock;
- check_unsafe_exec(bprm);
+
+ retval = check_unsafe_exec(bprm);
+ if (retval)
+ goto out_unlock;
file = open_exec(filename);
retval = PTR_ERR(file);
if (IS_ERR(file))
- goto out_unlock;
+ goto out_unmark;
sched_exec();
@@ -1459,6 +1463,9 @@ int compat_do_execve(char * filename,
goto out;
/* execve succeeded */
+ write_lock(¤t->fs->lock);
+ current->fs->in_exec = 0;
+ write_unlock(¤t->fs->lock);
mutex_unlock(¤t->cred_exec_mutex);
acct_update_integrals(current);
free_bprm(bprm);
@@ -1476,6 +1483,11 @@ out_file:
fput(bprm->file);
}
+out_unmark:
+ write_lock(¤t->fs->lock);
+ current->fs->in_exec = 0;
+ write_unlock(¤t->fs->lock);
+
out_unlock:
mutex_unlock(¤t->cred_exec_mutex);
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1049,16 +1049,18 @@ EXPORT_SYMBOL(install_exec_creds);
* - the caller must hold current->cred_exec_mutex to protect against
* PTRACE_ATTACH
*/
-void check_unsafe_exec(struct linux_binprm *bprm)
+int check_unsafe_exec(struct linux_binprm *bprm)
{
struct task_struct *p = current, *t;
unsigned long flags;
unsigned n_fs, n_sighand;
+ int res = 0;
bprm->unsafe = tracehook_unsafe_exec(p);
n_fs = 1;
n_sighand = 1;
+ write_lock(&p->fs->lock);
lock_task_sighand(p, &flags);
for (t = next_thread(p); t != p; t = next_thread(t)) {
if (t->fs == p->fs)
@@ -1066,11 +1068,19 @@ void check_unsafe_exec(struct linux_binp
n_sighand++;
}
- if (atomic_read(&p->fs->count) > n_fs ||
- atomic_read(&p->sighand->count) > n_sighand)
+ if (p->fs->users > n_fs ||
+ atomic_read(&p->sighand->count) > n_sighand) {
bprm->unsafe |= LSM_UNSAFE_SHARE;
+ } else {
+ if (p->fs->in_exec)
+ res = -EAGAIN;
+ p->fs->in_exec = 1;
+ }
unlock_task_sighand(p, &flags);
+ write_unlock(&p->fs->lock);
+
+ return res;
}
/*
@@ -1285,12 +1295,15 @@ int do_execve(char * filename,
bprm->cred = prepare_exec_creds();
if (!bprm->cred)
goto out_unlock;
- check_unsafe_exec(bprm);
+
+ retval = check_unsafe_exec(bprm);
+ if (retval)
+ goto out_unlock;
file = open_exec(filename);
retval = PTR_ERR(file);
if (IS_ERR(file))
- goto out_unlock;
+ goto out_unmark;
sched_exec();
@@ -1333,6 +1346,9 @@ int do_execve(char * filename,
goto out;
/* execve succeeded */
+ write_lock(¤t->fs->lock);
+ current->fs->in_exec = 0;
+ write_unlock(¤t->fs->lock);
mutex_unlock(¤t->cred_exec_mutex);
acct_update_integrals(current);
free_bprm(bprm);
@@ -1350,6 +1366,11 @@ out_file:
fput(bprm->file);
}
+out_unmark:
+ write_lock(¤t->fs->lock);
+ current->fs->in_exec = 0;
+ write_unlock(¤t->fs->lock);
+
out_unlock:
mutex_unlock(¤t->cred_exec_mutex);
--- a/fs/fs_struct.c
+++ b/fs/fs_struct.c
@@ -72,25 +72,27 @@ void chroot_fs_refs(struct path *old_roo
path_put(old_root);
}
-void put_fs_struct(struct fs_struct *fs)
+void free_fs_struct(struct fs_struct *fs)
{
- /* No need to hold fs->lock if we are killing it */
- if (atomic_dec_and_test(&fs->count)) {
- path_put(&fs->root);
- path_put(&fs->pwd);
- kmem_cache_free(fs_cachep, fs);
- }
+ path_put(&fs->root);
+ path_put(&fs->pwd);
+ kmem_cache_free(fs_cachep, fs);
}
void exit_fs(struct task_struct *tsk)
{
- struct fs_struct * fs = tsk->fs;
+ struct fs_struct *fs = tsk->fs;
if (fs) {
+ int kill;
task_lock(tsk);
+ write_lock(&fs->lock);
tsk->fs = NULL;
+ kill = !--fs->users;
+ write_unlock(&fs->lock);
task_unlock(tsk);
- put_fs_struct(fs);
+ if (kill)
+ free_fs_struct(fs);
}
}
@@ -99,7 +101,8 @@ struct fs_struct *copy_fs_struct(struct
struct fs_struct *fs = kmem_cache_alloc(fs_cachep, GFP_KERNEL);
/* We don't need to lock fs - think why ;-) */
if (fs) {
- atomic_set(&fs->count, 1);
+ fs->users = 1;
+ fs->in_exec = 0;
rwlock_init(&fs->lock);
fs->umask = old->umask;
read_lock(&old->lock);
@@ -114,28 +117,54 @@ struct fs_struct *copy_fs_struct(struct
int unshare_fs_struct(void)
{
- struct fs_struct *fsp = copy_fs_struct(current->fs);
- if (!fsp)
+ struct fs_struct *fs = current->fs;
+ struct fs_struct *new_fs = copy_fs_struct(fs);
+ int kill;
+
+ if (!new_fs)
return -ENOMEM;
- exit_fs(current);
- current->fs = fsp;
+
+ task_lock(current);
+ write_lock(&fs->lock);
+ kill = !--fs->users;
+ current->fs = new_fs;
+ write_unlock(&fs->lock);
+ task_unlock(current);
+
+ if (kill)
+ free_fs_struct(fs);
+
return 0;
}
EXPORT_SYMBOL_GPL(unshare_fs_struct);
/* to be mentioned only in INIT_TASK */
struct fs_struct init_fs = {
- .count = ATOMIC_INIT(1),
+ .users = 1,
.lock = __RW_LOCK_UNLOCKED(init_fs.lock),
.umask = 0022,
};
void daemonize_fs_struct(void)
{
- struct fs_struct *fs;
+ struct fs_struct *fs = current->fs;
- exit_fs(current); /* current->fs->count--; */
- fs = &init_fs;
- current->fs = fs;
- atomic_inc(&fs->count);
+ if (fs) {
+ int kill;
+
+ task_lock(current);
+
+ write_lock(&init_fs.lock);
+ init_fs.users++;
+ write_unlock(&init_fs.lock);
+
+ write_lock(&fs->lock);
+ current->fs = &init_fs;
+ kill = !--fs->users;
+ write_unlock(&fs->lock);
+
+ task_unlock(current);
+ if (kill)
+ free_fs_struct(fs);
+ }
}
--- a/fs/internal.h
+++ b/fs/internal.h
@@ -44,7 +44,7 @@ extern void __init chrdev_init(void);
/*
* exec.c
*/
-extern void check_unsafe_exec(struct linux_binprm *);
+extern int check_unsafe_exec(struct linux_binprm *);
/*
* namespace.c
--- a/fs/proc/task_nommu.c
+++ b/fs/proc/task_nommu.c
@@ -49,7 +49,7 @@ void task_mem(struct seq_file *m, struct
else
bytes += kobjsize(mm);
- if (current->fs && atomic_read(¤t->fs->count) > 1)
+ if (current->fs && current->fs->users > 1)
sbytes += kobjsize(current->fs);
else
bytes += kobjsize(current->fs);
--- a/include/linux/fs_struct.h
+++ b/include/linux/fs_struct.h
@@ -4,12 +4,10 @@
#include <linux/path.h>
struct fs_struct {
- atomic_t count; /* This usage count is used by check_unsafe_exec() for
- * security checking purposes - therefore it may not be
- * incremented, except by clone(CLONE_FS).
- */
+ int users;
rwlock_t lock;
int umask;
+ int in_exec;
struct path root, pwd;
};
@@ -19,7 +17,7 @@ extern void exit_fs(struct task_struct *
extern void set_fs_root(struct fs_struct *, struct path *);
extern void set_fs_pwd(struct fs_struct *, struct path *);
extern struct fs_struct *copy_fs_struct(struct fs_struct *);
-extern void put_fs_struct(struct fs_struct *);
+extern void free_fs_struct(struct fs_struct *);
extern void daemonize_fs_struct(void);
extern int unshare_fs_struct(void);
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -678,11 +678,19 @@ fail_nomem:
static int copy_fs(unsigned long clone_flags, struct task_struct *tsk)
{
+ struct fs_struct *fs = current->fs;
if (clone_flags & CLONE_FS) {
- atomic_inc(¤t->fs->count);
+ /* tsk->fs is already what we want */
+ write_lock(&fs->lock);
+ if (fs->in_exec) {
+ write_unlock(&fs->lock);
+ return -EAGAIN;
+ }
+ fs->users++;
+ write_unlock(&fs->lock);
return 0;
}
- tsk->fs = copy_fs_struct(current->fs);
+ tsk->fs = copy_fs_struct(fs);
if (!tsk->fs)
return -ENOMEM;
return 0;
@@ -1518,12 +1526,16 @@ static int unshare_fs(unsigned long unsh
{
struct fs_struct *fs = current->fs;
- if ((unshare_flags & CLONE_FS) &&
- (fs && atomic_read(&fs->count) > 1)) {
- *new_fsp = copy_fs_struct(current->fs);
- if (!*new_fsp)
- return -ENOMEM;
- }
+ if (!(unshare_flags & CLONE_FS) || !fs)
+ return 0;
+
+ /* don't need lock here; in the worst case we'll do useless copy */
+ if (fs->users == 1)
+ return 0;
+
+ *new_fsp = copy_fs_struct(fs);
+ if (!*new_fsp)
+ return -ENOMEM;
return 0;
}
@@ -1639,8 +1651,13 @@ SYSCALL_DEFINE1(unshare, unsigned long,
if (new_fs) {
fs = current->fs;
+ write_lock(&fs->lock);
current->fs = new_fs;
- new_fs = fs;
+ if (--fs->users)
+ new_fs = NULL;
+ else
+ new_fs = fs;
+ write_unlock(&fs->lock);
}
if (new_mm) {
@@ -1679,7 +1696,7 @@ bad_unshare_cleanup_sigh:
bad_unshare_cleanup_fs:
if (new_fs)
- put_fs_struct(new_fs);
+ free_fs_struct(new_fs);
bad_unshare_cleanup_thread:
bad_unshare_out:
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 41/58] check_unsafe_exec() doesnt care about signal handlers sharing
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (39 preceding siblings ...)
2009-05-06 21:46 ` [patch 40/58] New locking/refcounting for fs_struct Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 21:46 ` [patch 42/58] do_execve() must not clear fs->in_exec if it was set by another thread Greg KH
` (18 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Al Viro
[-- Attachment #1: check_unsafe_exec-doesn-t-care-about-signal-handlers-sharing.patch --]
[-- Type: text/plain, Size: 1077 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Al Viro <viro@zeniv.linux.org.uk>
commit f1191b50ec11c8e2ca766d6d99eb5bb9d2c084a3 upstream.
... since we'll unshare sighand anyway
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/exec.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1053,23 +1053,20 @@ int check_unsafe_exec(struct linux_binpr
{
struct task_struct *p = current, *t;
unsigned long flags;
- unsigned n_fs, n_sighand;
+ unsigned n_fs;
int res = 0;
bprm->unsafe = tracehook_unsafe_exec(p);
n_fs = 1;
- n_sighand = 1;
write_lock(&p->fs->lock);
lock_task_sighand(p, &flags);
for (t = next_thread(p); t != p; t = next_thread(t)) {
if (t->fs == p->fs)
n_fs++;
- n_sighand++;
}
- if (p->fs->users > n_fs ||
- atomic_read(&p->sighand->count) > n_sighand) {
+ if (p->fs->users > n_fs) {
bprm->unsafe |= LSM_UNSAFE_SHARE;
} else {
if (p->fs->in_exec)
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 42/58] do_execve() must not clear fs->in_exec if it was set by another thread
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (40 preceding siblings ...)
2009-05-06 21:46 ` [patch 41/58] check_unsafe_exec() doesnt care about signal handlers sharing Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 21:46 ` [patch 43/58] check_unsafe_exec: s/lock_task_sighand/rcu_read_lock/ Greg KH
` (17 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Oleg Nesterov, Roland McGrath, Hugh Dickins
[-- Attachment #1: do_execve-must-not-clear-fs-in_exec-if-it-was-set-by-another-thread.patch --]
[-- Type: text/plain, Size: 4148 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Oleg Nesterov <oleg@redhat.com>
commit 8c652f96d3852b97a49c331cd0bb02d22f3cb31b upstream.
If do_execve() fails after check_unsafe_exec(), it clears fs->in_exec
unconditionally. This is wrong if we race with our sub-thread which
also does do_execve:
Two threads T1 and T2 and another process P, all share the same
->fs.
T1 starts do_execve(BAD_FILE). It calls check_unsafe_exec(), since
->fs is shared, we set LSM_UNSAFE but not ->in_exec.
P exits and decrements fs->users.
T2 starts do_execve(), calls check_unsafe_exec(), now ->fs is not
shared, we set fs->in_exec.
T1 continues, open_exec(BAD_FILE) fails, we clear ->in_exec and
return to the user-space.
T1 does clone(CLONE_FS /* without CLONE_THREAD */).
T2 continues without LSM_UNSAFE_SHARE while ->fs is shared with
another process.
Change check_unsafe_exec() to return res = 1 if we set ->in_exec, and change
do_execve() to clear ->in_exec depending on res.
When do_execve() suceeds, it is safe to clear ->in_exec unconditionally.
It can be set only if we don't share ->fs with another process, and since
we already killed all sub-threads either ->in_exec == 0 or we are the
only user of this ->fs.
Also, we do not need fs->lock to clear fs->in_exec.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Roland McGrath <roland@redhat.com>
Acked-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/compat.c | 11 +++++------
fs/exec.c | 19 ++++++++++---------
2 files changed, 15 insertions(+), 15 deletions(-)
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -1394,6 +1394,7 @@ int compat_do_execve(char * filename,
struct linux_binprm *bprm;
struct file *file;
struct files_struct *displaced;
+ bool clear_in_exec;
int retval;
retval = unshare_files(&displaced);
@@ -1415,8 +1416,9 @@ int compat_do_execve(char * filename,
goto out_unlock;
retval = check_unsafe_exec(bprm);
- if (retval)
+ if (retval < 0)
goto out_unlock;
+ clear_in_exec = retval;
file = open_exec(filename);
retval = PTR_ERR(file);
@@ -1463,9 +1465,7 @@ int compat_do_execve(char * filename,
goto out;
/* execve succeeded */
- write_lock(¤t->fs->lock);
current->fs->in_exec = 0;
- write_unlock(¤t->fs->lock);
mutex_unlock(¤t->cred_exec_mutex);
acct_update_integrals(current);
free_bprm(bprm);
@@ -1484,9 +1484,8 @@ out_file:
}
out_unmark:
- write_lock(¤t->fs->lock);
- current->fs->in_exec = 0;
- write_unlock(¤t->fs->lock);
+ if (clear_in_exec)
+ current->fs->in_exec = 0;
out_unlock:
mutex_unlock(¤t->cred_exec_mutex);
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1069,9 +1069,11 @@ int check_unsafe_exec(struct linux_binpr
if (p->fs->users > n_fs) {
bprm->unsafe |= LSM_UNSAFE_SHARE;
} else {
- if (p->fs->in_exec)
- res = -EAGAIN;
- p->fs->in_exec = 1;
+ res = -EAGAIN;
+ if (!p->fs->in_exec) {
+ p->fs->in_exec = 1;
+ res = 1;
+ }
}
unlock_task_sighand(p, &flags);
@@ -1273,6 +1275,7 @@ int do_execve(char * filename,
struct linux_binprm *bprm;
struct file *file;
struct files_struct *displaced;
+ bool clear_in_exec;
int retval;
retval = unshare_files(&displaced);
@@ -1294,8 +1297,9 @@ int do_execve(char * filename,
goto out_unlock;
retval = check_unsafe_exec(bprm);
- if (retval)
+ if (retval < 0)
goto out_unlock;
+ clear_in_exec = retval;
file = open_exec(filename);
retval = PTR_ERR(file);
@@ -1343,9 +1347,7 @@ int do_execve(char * filename,
goto out;
/* execve succeeded */
- write_lock(¤t->fs->lock);
current->fs->in_exec = 0;
- write_unlock(¤t->fs->lock);
mutex_unlock(¤t->cred_exec_mutex);
acct_update_integrals(current);
free_bprm(bprm);
@@ -1364,9 +1366,8 @@ out_file:
}
out_unmark:
- write_lock(¤t->fs->lock);
- current->fs->in_exec = 0;
- write_unlock(¤t->fs->lock);
+ if (clear_in_exec)
+ current->fs->in_exec = 0;
out_unlock:
mutex_unlock(¤t->cred_exec_mutex);
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 43/58] check_unsafe_exec: s/lock_task_sighand/rcu_read_lock/
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (41 preceding siblings ...)
2009-05-06 21:46 ` [patch 42/58] do_execve() must not clear fs->in_exec if it was set by another thread Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 21:46 ` [patch 44/58] mv643xx_eth: 64bit mib counter read fix Greg KH
` (16 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Oleg Nesterov, Roland McGrath, Hugh Dickins
[-- Attachment #1: check_unsafe_exec-s-lock_task_sighand-rcu_read_lock.patch --]
[-- Type: text/plain, Size: 1700 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Oleg Nesterov <oleg@redhat.com>
commit 437f7fdb607f32b737e4da9f14bebcfdac2c90c3 upstream.
write_lock(¤t->fs->lock) guarantees we can't wrongly miss
LSM_UNSAFE_SHARE, this is what we care about. Use rcu_read_lock()
instead of ->siglock to iterate over the sub-threads. We must see
all CLONE_THREAD|CLONE_FS threads which didn't pass exit_fs(), it
takes fs->lock too.
With or without this patch we can miss the freshly cloned thread
and set LSM_UNSAFE_SHARE, we don't care.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Roland McGrath <roland@redhat.com>
[ Fixed lock/unlock typo - Hugh ]
Acked-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/exec.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1052,7 +1052,6 @@ EXPORT_SYMBOL(install_exec_creds);
int check_unsafe_exec(struct linux_binprm *bprm)
{
struct task_struct *p = current, *t;
- unsigned long flags;
unsigned n_fs;
int res = 0;
@@ -1060,11 +1059,12 @@ int check_unsafe_exec(struct linux_binpr
n_fs = 1;
write_lock(&p->fs->lock);
- lock_task_sighand(p, &flags);
+ rcu_read_lock();
for (t = next_thread(p); t != p; t = next_thread(t)) {
if (t->fs == p->fs)
n_fs++;
}
+ rcu_read_unlock();
if (p->fs->users > n_fs) {
bprm->unsafe |= LSM_UNSAFE_SHARE;
@@ -1075,8 +1075,6 @@ int check_unsafe_exec(struct linux_binpr
res = 1;
}
}
-
- unlock_task_sighand(p, &flags);
write_unlock(&p->fs->lock);
return res;
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 44/58] mv643xx_eth: 64bit mib counter read fix
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (42 preceding siblings ...)
2009-05-06 21:46 ` [patch 43/58] check_unsafe_exec: s/lock_task_sighand/rcu_read_lock/ Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 21:46 ` [patch 45/58] mv643xx_eth: OOM handling fixes Greg KH
` (15 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Lennert Buytenhek, David S. Miller
[-- Attachment #1: mv643xx_eth-64bit-mib-counter-read-fix.patch --]
[-- Type: text/plain, Size: 1994 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Lennert Buytenhek <buytenh@wantstofly.org>
commit 93af7aca44f0e82e67bda10a0fb73d383edcc8bd upstream.
On several mv643xx_eth hardware versions, the two 64bit mib counters
for 'good octets received' and 'good octets sent' are actually 32bit
counters, and reading from the upper half of the register has the same
effect as reading from the lower half of the register: an atomic
read-and-clear of the entire 32bit counter value. This can under heavy
traffic occasionally lead to small numbers being added to the upper
half of the 64bit mib counter even though no 32bit wrap has occured.
Since we poll the mib counters at least every 30 seconds anyway, we
might as well just skip the reads of the upper halves of the hardware
counters without breaking the stats, which this patch does.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Cc: stable@kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/mv643xx_eth.c | 2 --
1 file changed, 2 deletions(-)
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -1177,7 +1177,6 @@ static void mib_counters_update(struct m
spin_lock_bh(&mp->mib_counters_lock);
p->good_octets_received += mib_read(mp, 0x00);
- p->good_octets_received += (u64)mib_read(mp, 0x04) << 32;
p->bad_octets_received += mib_read(mp, 0x08);
p->internal_mac_transmit_err += mib_read(mp, 0x0c);
p->good_frames_received += mib_read(mp, 0x10);
@@ -1191,7 +1190,6 @@ static void mib_counters_update(struct m
p->frames_512_to_1023_octets += mib_read(mp, 0x30);
p->frames_1024_to_max_octets += mib_read(mp, 0x34);
p->good_octets_sent += mib_read(mp, 0x38);
- p->good_octets_sent += (u64)mib_read(mp, 0x3c) << 32;
p->good_frames_sent += mib_read(mp, 0x40);
p->excessive_collision += mib_read(mp, 0x44);
p->multicast_frames_sent += mib_read(mp, 0x48);
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 45/58] mv643xx_eth: OOM handling fixes
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (43 preceding siblings ...)
2009-05-06 21:46 ` [patch 44/58] mv643xx_eth: 64bit mib counter read fix Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 21:46 ` [patch 46/58] ath5k: fix buffer overrun in rate debug code Greg KH
` (14 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Lennert Buytenhek, David S. Miller
[-- Attachment #1: mv643xx_eth-oom-handling-fixes.patch --]
[-- Type: text/plain, Size: 3519 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Lennert Buytenhek <buytenh@wantstofly.org>
commit 1319ebadf185933e6b7ff95211d3cef9004e9754 upstream.
Currently, when OOM occurs during rx ring refill, mv643xx_eth will get
into an infinite loop, due to the refill function setting the OOM bit
but not clearing the 'rx refill needed' bit for this queue, while the
calling function (the NAPI poll handler) will call the refill function
in a loop until the 'rx refill needed' bit goes off, without checking
the OOM bit.
This patch fixes this by checking the OOM bit in the NAPI poll handler
before attempting to do rx refill. This means that once OOM occurs,
we won't try to do any memory allocations again until the next invocation
of the poll handler.
While we're at it, change the OOM flag to be a single bit instead of
one bit per receive queue since OOM is a system state rather than a
per-queue state, and cancel the OOM timer on entry to the NAPI poll
handler if it's running to prevent it from firing when we've already
come out of OOM.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Cc: stable@kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/mv643xx_eth.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -372,12 +372,12 @@ struct mv643xx_eth_private {
struct work_struct tx_timeout_task;
struct napi_struct napi;
+ u8 oom;
u8 work_link;
u8 work_tx;
u8 work_tx_end;
u8 work_rx;
u8 work_rx_refill;
- u8 work_rx_oom;
int skb_size;
struct sk_buff_head rx_recycle;
@@ -603,7 +603,7 @@ static int rxq_refill(struct rx_queue *r
dma_get_cache_alignment() - 1);
if (skb == NULL) {
- mp->work_rx_oom |= 1 << rxq->index;
+ mp->oom = 1;
goto oom;
}
@@ -1906,8 +1906,10 @@ static int mv643xx_eth_poll(struct napi_
mp = container_of(napi, struct mv643xx_eth_private, napi);
- mp->work_rx_refill |= mp->work_rx_oom;
- mp->work_rx_oom = 0;
+ if (unlikely(mp->oom)) {
+ mp->oom = 0;
+ del_timer(&mp->rx_oom);
+ }
work_done = 0;
while (work_done < budget) {
@@ -1921,8 +1923,10 @@ static int mv643xx_eth_poll(struct napi_
continue;
}
- queue_mask = mp->work_tx | mp->work_tx_end |
- mp->work_rx | mp->work_rx_refill;
+ queue_mask = mp->work_tx | mp->work_tx_end | mp->work_rx;
+ if (likely(!mp->oom))
+ queue_mask |= mp->work_rx_refill;
+
if (!queue_mask) {
if (mv643xx_eth_collect_events(mp))
continue;
@@ -1943,7 +1947,7 @@ static int mv643xx_eth_poll(struct napi_
txq_maybe_wake(mp->txq + queue);
} else if (mp->work_rx & queue_mask) {
work_done += rxq_process(mp->rxq + queue, work_tbd);
- } else if (mp->work_rx_refill & queue_mask) {
+ } else if (!mp->oom && (mp->work_rx_refill & queue_mask)) {
work_done += rxq_refill(mp->rxq + queue, work_tbd);
} else {
BUG();
@@ -1951,7 +1955,7 @@ static int mv643xx_eth_poll(struct napi_
}
if (work_done < budget) {
- if (mp->work_rx_oom)
+ if (mp->oom)
mod_timer(&mp->rx_oom, jiffies + (HZ / 10));
napi_complete(napi);
wrlp(mp, INT_MASK, INT_TX_END | INT_RX | INT_EXT);
@@ -2143,7 +2147,7 @@ static int mv643xx_eth_open(struct net_d
rxq_refill(mp->rxq + i, INT_MAX);
}
- if (mp->work_rx_oom) {
+ if (mp->oom) {
mp->rx_oom.expires = jiffies + (HZ / 10);
add_timer(&mp->rx_oom);
}
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 46/58] ath5k: fix buffer overrun in rate debug code
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (44 preceding siblings ...)
2009-05-06 21:46 ` [patch 45/58] mv643xx_eth: OOM handling fixes Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 21:46 ` [patch 47/58] proc: avoid information leaks to non-privileged processes Greg KH
` (13 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Bob Copeland, John W. Linville
[-- Attachment #1: ath5k-fix-buffer-overrun-in-rate-debug-code.patch --]
[-- Type: text/plain, Size: 1090 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Bob Copeland <me@bobcopeland.com>
commit b7fcb5c4a4c27da2f6d86cb03d18687e537442cf upstream.
char bname[5] is too small for the string "X GHz" when the null
terminator is taken into account. Thus, turning on rate debugging
can crash unless we have lucky stack alignment.
Cc: stable@kernel.org
Reported-by: Paride Legovini <legovini@spiro.fisica.unipd.it>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/ath5k/debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/wireless/ath5k/debug.c
+++ b/drivers/net/wireless/ath5k/debug.c
@@ -465,7 +465,7 @@ ath5k_debug_dump_bands(struct ath5k_soft
for (b = 0; b < IEEE80211_NUM_BANDS; b++) {
struct ieee80211_supported_band *band = &sc->sbands[b];
- char bname[5];
+ char bname[6];
switch (band->band) {
case IEEE80211_BAND_2GHZ:
strcpy(bname, "2 GHz");
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 47/58] proc: avoid information leaks to non-privileged processes
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (45 preceding siblings ...)
2009-05-06 21:46 ` [patch 46/58] ath5k: fix buffer overrun in rate debug code Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 21:46 ` [patch 48/58] cs5536: define dma_sff_read_status() method Greg KH
` (12 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Arjan van de Ven, Eric W. Biederman
[-- Attachment #1: proc-avoid-information-leaks-to-non-privileged-processes.patch --]
[-- Type: text/plain, Size: 3103 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jake Edge <jake@lwn.net>
commit f83ce3e6b02d5e48b3a43b001390e2b58820389d upstream.
By using the same test as is used for /proc/pid/maps and /proc/pid/smaps,
only allow processes that can ptrace() a given process to see information
that might be used to bypass address space layout randomization (ASLR).
These include eip, esp, wchan, and start_stack in /proc/pid/stat as well
as the non-symbolic output from /proc/pid/wchan.
ASLR can be bypassed by sampling eip as shown by the proof-of-concept
code at http://code.google.com/p/fuzzyaslr/ As part of a presentation
(http://www.cr0.org/paper/to-jt-linux-alsr-leak.pdf) esp and wchan were
also noted as possibly usable information leaks as well. The
start_stack address also leaks potentially useful information.
Cc: Stable Team <stable@kernel.org>
Signed-off-by: Jake Edge <jake@lwn.net>
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/proc/array.c | 13 +++++++++----
fs/proc/base.c | 5 ++++-
2 files changed, 13 insertions(+), 5 deletions(-)
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -80,6 +80,7 @@
#include <linux/delayacct.h>
#include <linux/seq_file.h>
#include <linux/pid_namespace.h>
+#include <linux/ptrace.h>
#include <linux/tracehook.h>
#include <asm/pgtable.h>
@@ -352,6 +353,7 @@ static int do_task_stat(struct seq_file
char state;
pid_t ppid = 0, pgid = -1, sid = -1;
int num_threads = 0;
+ int permitted;
struct mm_struct *mm;
unsigned long long start_time;
unsigned long cmin_flt = 0, cmaj_flt = 0;
@@ -364,11 +366,14 @@ static int do_task_stat(struct seq_file
state = *get_task_state(task);
vsize = eip = esp = 0;
+ permitted = ptrace_may_access(task, PTRACE_MODE_READ);
mm = get_task_mm(task);
if (mm) {
vsize = task_vsize(mm);
- eip = KSTK_EIP(task);
- esp = KSTK_ESP(task);
+ if (permitted) {
+ eip = KSTK_EIP(task);
+ esp = KSTK_ESP(task);
+ }
}
get_task_comm(tcomm, task);
@@ -424,7 +429,7 @@ static int do_task_stat(struct seq_file
unlock_task_sighand(task, &flags);
}
- if (!whole || num_threads < 2)
+ if (permitted && (!whole || num_threads < 2))
wchan = get_wchan(task);
if (!whole) {
min_flt = task->min_flt;
@@ -476,7 +481,7 @@ static int do_task_stat(struct seq_file
rsslim,
mm ? mm->start_code : 0,
mm ? mm->end_code : 0,
- mm ? mm->start_stack : 0,
+ (permitted && mm) ? mm->start_stack : 0,
esp,
eip,
/* The signal information here is obsolete.
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -321,7 +321,10 @@ static int proc_pid_wchan(struct task_st
wchan = get_wchan(task);
if (lookup_symbol_name(wchan, symname) < 0)
- return sprintf(buffer, "%lu", wchan);
+ if (!ptrace_may_access(task, PTRACE_MODE_READ))
+ return 0;
+ else
+ return sprintf(buffer, "%lu", wchan);
else
return sprintf(buffer, "%s", symname);
}
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 48/58] cs5536: define dma_sff_read_status() method
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (46 preceding siblings ...)
2009-05-06 21:46 ` [patch 47/58] proc: avoid information leaks to non-privileged processes Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 21:46 ` [patch 49/58] intel-iommu: Fix device-to-iommu mapping for PCI-PCI bridges Greg KH
` (11 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Sergei Shtylyov, Bartlomiej Zolnierkiewicz
[-- Attachment #1: cs5536-define-dma_sff_read_status-method.patch --]
[-- Type: text/plain, Size: 1021 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
commit 15da90b516e9da92cc1d90001e640fd6707d0e27 upstream.
The driver somehow got merged with the initializer for the dma_sff_read_status()
method missing which caused kernel panic on bootup.
This should fix the kernel.org bug #13026...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Reported-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/ide/cs5536.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/ide/cs5536.c
+++ b/drivers/ide/cs5536.c
@@ -237,6 +237,7 @@ static const struct ide_dma_ops cs5536_d
.dma_test_irq = ide_dma_test_irq,
.dma_lost_irq = ide_dma_lost_irq,
.dma_timeout = ide_dma_timeout,
+ .dma_sff_read_status = ide_dma_sff_read_status,
};
static const struct ide_port_info cs5536_info = {
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 49/58] intel-iommu: Fix device-to-iommu mapping for PCI-PCI bridges.
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (47 preceding siblings ...)
2009-05-06 21:46 ` [patch 48/58] cs5536: define dma_sff_read_status() method Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 21:46 ` [patch 50/58] intel-iommu: Fix oops in device_to_iommu() when devices not found Greg KH
` (10 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, David Woodhouse
[-- Attachment #1: intel-iommu-fix-device-to-iommu-mapping-for-pci-pci-bridges.patch --]
[-- Type: text/plain, Size: 1466 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: David Woodhouse <dwmw2@infradead.org>
(cherry picked from commit 924b6231edfaf1e764ffb4f97ea382bf4facff58)
When the DMAR table identifies that a PCI-PCI bridge belongs to a given
IOMMU, that means that the bridge and all devices behind it should be
associated with the IOMMU. Not just the bridge itself.
This fixes the device_to_iommu() function accordingly.
(It's broken if you have the same PCI bus numbers in multiple domains,
but this function was always broken in that way; I'll be dealing with
that later).
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/pci/intel-iommu.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -447,11 +447,16 @@ static struct intel_iommu *device_to_iom
if (drhd->ignored)
continue;
- for (i = 0; i < drhd->devices_cnt; i++)
+ for (i = 0; i < drhd->devices_cnt; i++) {
if (drhd->devices[i] &&
drhd->devices[i]->bus->number == bus &&
drhd->devices[i]->devfn == devfn)
return drhd->iommu;
+ if (drhd->devices[i]->subordinate &&
+ drhd->devices[i]->subordinate->number <= bus &&
+ drhd->devices[i]->subordinate->subordinate >= bus)
+ return drhd->iommu;
+ }
if (drhd->include_all)
return drhd->iommu;
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 50/58] intel-iommu: Fix oops in device_to_iommu() when devices not found.
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (48 preceding siblings ...)
2009-05-06 21:46 ` [patch 49/58] intel-iommu: Fix device-to-iommu mapping for PCI-PCI bridges Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 21:46 ` [patch 51/58] intel-iommu: Avoid panic() for DRHD at address zero Greg KH
` (9 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, David Woodhouse
[-- Attachment #1: intel-iommu-fix-oops-in-device_to_iommu-when-devices-not-found.patch --]
[-- Type: text/plain, Size: 1054 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: David Woodhouse <dwmw2@infradead.org>
(cherry picked from commit 4958c5dc7bcb2e42d985cd26aeafd8a7eca9ab1e)
It's possible for a device in the drhd->devices[] array to be NULL if
it wasn't found at boot time, which means we have to check for that
case.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/pci/intel-iommu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -452,7 +452,8 @@ static struct intel_iommu *device_to_iom
drhd->devices[i]->bus->number == bus &&
drhd->devices[i]->devfn == devfn)
return drhd->iommu;
- if (drhd->devices[i]->subordinate &&
+ if (drhd->devices[i] &&
+ drhd->devices[i]->subordinate &&
drhd->devices[i]->subordinate->number <= bus &&
drhd->devices[i]->subordinate->subordinate >= bus)
return drhd->iommu;
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 51/58] intel-iommu: Avoid panic() for DRHD at address zero.
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (49 preceding siblings ...)
2009-05-06 21:46 ` [patch 50/58] intel-iommu: Fix oops in device_to_iommu() when devices not found Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 21:46 ` [patch 52/58] clockevents: prevent endless loop in tick_handle_periodic() Greg KH
` (8 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, David Woodhouse
[-- Attachment #1: intel-iommu-avoid-panic-for-drhd-at-address-zero.patch --]
[-- Type: text/plain, Size: 1596 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: David Woodhouse <dwmw2@infradead.org>
(cherry picked from commit e523b38e2f568af58baa13120a994cbf24e6dee0)
If the BIOS does something obviously stupid, like claiming that the
registers for the IOMMU are at physical address zero, then print a nasty
message and abort, rather than trying to set up the IOMMU and then later
panicking.
It's becoming more and more obvious that trusting this stuff to the BIOS
was a mistake.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/pci/dmar.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
--- a/drivers/pci/dmar.c
+++ b/drivers/pci/dmar.c
@@ -170,12 +170,21 @@ dmar_parse_one_drhd(struct acpi_dmar_hea
struct dmar_drhd_unit *dmaru;
int ret = 0;
+ drhd = (struct acpi_dmar_hardware_unit *)header;
+ if (!drhd->address) {
+ /* Promote an attitude of violence to a BIOS engineer today */
+ WARN(1, "Your BIOS is broken; DMAR reported at address zero!\n"
+ "BIOS vendor: %s; Ver: %s; Product Version: %s\n",
+ dmi_get_system_info(DMI_BIOS_VENDOR),
+ dmi_get_system_info(DMI_BIOS_VERSION),
+ dmi_get_system_info(DMI_PRODUCT_VERSION));
+ return -ENODEV;
+ }
dmaru = kzalloc(sizeof(*dmaru), GFP_KERNEL);
if (!dmaru)
return -ENOMEM;
dmaru->hdr = header;
- drhd = (struct acpi_dmar_hardware_unit *)header;
dmaru->reg_base_addr = drhd->address;
dmaru->include_all = drhd->flags & 0x1; /* BIT0: INCLUDE_ALL */
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 52/58] clockevents: prevent endless loop in tick_handle_periodic()
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (50 preceding siblings ...)
2009-05-06 21:46 ` [patch 51/58] intel-iommu: Avoid panic() for DRHD at address zero Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 21:46 ` [patch 53/58] Ignore madvise(MADV_WILLNEED) for hugetlbfs-backed regions Greg KH
` (7 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, John Stultz, Thomas Gleixner
[-- Attachment #1: clockevents-prevent-endless-loop-in-tick_handle_periodic.patch --]
[-- Type: text/plain, Size: 1968 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: john stultz <johnstul@us.ibm.com>
commit 74a03b69d1b5ce00a568e142ca97e76b7f5239c6 upstream.
tick_handle_periodic() can lock up hard when a one shot clock event
device is used in combination with jiffies clocksource.
Avoid an endless loop issue by requiring that a highres valid
clocksource be installed before we call tick_periodic() in a loop when
using ONESHOT mode. The result is we will only increment jiffies once
per interrupt until a continuous hardware clocksource is available.
Without this, we can run into a endless loop, where each cycle through
the loop, jiffies is updated which increments time by tick_period or
more (due to clock steering), which can cause the event programming to
think the next event was before the newly incremented time and fail
causing tick_periodic() to be called again and the whole process loops
forever.
[ Impact: prevent hard lock up ]
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/kernel/time/tick-common.c
+++ b/kernel/time/tick-common.c
@@ -93,7 +93,17 @@ void tick_handle_periodic(struct clock_event_device *dev)
for (;;) {
if (!clockevents_program_event(dev, next, ktime_get()))
return;
- tick_periodic(cpu);
+ /*
+ * Have to be careful here. If we're in oneshot mode,
+ * before we call tick_periodic() in a loop, we need
+ * to be sure we're using a real hardware clocksource.
+ * Otherwise we could get trapped in an infinite
+ * loop, as the tick_periodic() increments jiffies,
+ * when then will increment time, posibly causing
+ * the loop to trigger again and again.
+ */
+ if (timekeeping_valid_for_hres())
+ tick_periodic(cpu);
next = ktime_add(next, tick_period);
}
}
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 53/58] Ignore madvise(MADV_WILLNEED) for hugetlbfs-backed regions
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (51 preceding siblings ...)
2009-05-06 21:46 ` [patch 52/58] clockevents: prevent endless loop in tick_handle_periodic() Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 21:46 ` [patch 54/58] mm: fix Committed_AS underflow on large NR_CPUS environment Greg KH
` (6 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Mel Gorman
[-- Attachment #1: ignore-madvise-for-hugetlbfs-backed-regions.patch --]
[-- Type: text/plain, Size: 1378 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Mel Gorman <mel@csn.ul.ie>
commit a425a638c858fd10370b573bde81df3ba500e271 upstream.
madvise(MADV_WILLNEED) forces page cache readahead on a range of memory
backed by a file. The assumption is made that the page required is
order-0 and "normal" page cache.
On hugetlbfs, this assumption is not true and order-0 pages are
allocated and inserted into the hugetlbfs page cache. This leaks
hugetlbfs page reservations and can cause BUGs to trigger related to
corrupted page tables.
This patch causes MADV_WILLNEED to be ignored for hugetlbfs-backed
regions.
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
mm/madvise.c | 8 ++++++++
1 file changed, 8 insertions(+)
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -112,6 +112,14 @@ static long madvise_willneed(struct vm_a
if (!file)
return -EBADF;
+ /*
+ * Page cache readahead assumes page cache pages are order-0 which
+ * is not the case for hugetlbfs. Do not give a bad return value
+ * but ignore the advice.
+ */
+ if (vma->vm_flags & VM_HUGETLB)
+ return 0;
+
if (file->f_mapping->a_ops->get_xip_mem) {
/* no bad return value, but ignore advice */
return 0;
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 54/58] mm: fix Committed_AS underflow on large NR_CPUS environment
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (52 preceding siblings ...)
2009-05-06 21:46 ` [patch 53/58] Ignore madvise(MADV_WILLNEED) for hugetlbfs-backed regions Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 21:46 ` [patch 55/58] rndis_wlan: fix initialization order for workqueue&workers Greg KH
` (5 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 UTC (permalink / raw)
To: linux-kernel, stable, Greg KH
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, KOSAKI Motohiro, Eric B Munson, Mel Gorman,
Christoph Lameter
[-- Attachment #1: committed_as-for-2.6.29.2.patch --]
[-- Type: text/plain, Size: 6932 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
commit 00a62ce91e554198ef28234c91c36f850f5a3bc9 upstream
The Committed_AS field can underflow in certain situations:
> # while true; do cat /proc/meminfo | grep _AS; sleep 1; done | uniq -c
> 1 Committed_AS: 18446744073709323392 kB
> 11 Committed_AS: 18446744073709455488 kB
> 6 Committed_AS: 35136 kB
> 5 Committed_AS: 18446744073709454400 kB
> 7 Committed_AS: 35904 kB
> 3 Committed_AS: 18446744073709453248 kB
> 2 Committed_AS: 34752 kB
> 9 Committed_AS: 18446744073709453248 kB
> 8 Committed_AS: 34752 kB
> 3 Committed_AS: 18446744073709320960 kB
> 7 Committed_AS: 18446744073709454080 kB
> 3 Committed_AS: 18446744073709320960 kB
> 5 Committed_AS: 18446744073709454080 kB
> 6 Committed_AS: 18446744073709320960 kB
Because NR_CPUS can be greater than 1000 and meminfo_proc_show() does
not check for underflow.
But NR_CPUS proportional isn't good calculation. In general,
possibility of lock contention is proportional to the number of online
cpus, not theorical maximum cpus (NR_CPUS).
The current kernel has generic percpu-counter stuff. using it is right
way. it makes code simplify and percpu_counter_read_positive() don't
make underflow issue.
Reported-by: Dave Hansen <dave@linux.vnet.ibm.com>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Eric B Munson <ebmunson@us.ibm.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/proc/meminfo.c | 2 +-
include/linux/mman.h | 9 +++------
mm/mmap.c | 12 ++++++------
mm/nommu.c | 13 +++++++------
mm/swap.c | 46 ----------------------------------------------
5 files changed, 17 insertions(+), 65 deletions(-)
--- a/fs/proc/meminfo.c
+++ b/fs/proc/meminfo.c
@@ -35,7 +35,7 @@ static int meminfo_proc_show(struct seq_
#define K(x) ((x) << (PAGE_SHIFT - 10))
si_meminfo(&i);
si_swapinfo(&i);
- committed = atomic_long_read(&vm_committed_space);
+ committed = percpu_counter_read_positive(&vm_committed_as);
allowed = ((totalram_pages - hugetlb_total_pages())
* sysctl_overcommit_ratio / 100) + total_swap_pages;
--- a/include/linux/mman.h
+++ b/include/linux/mman.h
@@ -12,21 +12,18 @@
#ifdef __KERNEL__
#include <linux/mm.h>
+#include <linux/percpu_counter.h>
#include <asm/atomic.h>
extern int sysctl_overcommit_memory;
extern int sysctl_overcommit_ratio;
-extern atomic_long_t vm_committed_space;
+extern struct percpu_counter vm_committed_as;
-#ifdef CONFIG_SMP
-extern void vm_acct_memory(long pages);
-#else
static inline void vm_acct_memory(long pages)
{
- atomic_long_add(pages, &vm_committed_space);
+ percpu_counter_add(&vm_committed_as, pages);
}
-#endif
static inline void vm_unacct_memory(long pages)
{
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -84,7 +84,7 @@ EXPORT_SYMBOL(vm_get_page_prot);
int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */
int sysctl_overcommit_ratio = 50; /* default is 50% */
int sysctl_max_map_count __read_mostly = DEFAULT_MAX_MAP_COUNT;
-atomic_long_t vm_committed_space = ATOMIC_LONG_INIT(0);
+struct percpu_counter vm_committed_as;
/*
* Check that a process has enough memory to allocate a new virtual
@@ -178,11 +178,7 @@ int __vm_enough_memory(struct mm_struct
if (mm)
allowed -= mm->total_vm / 32;
- /*
- * cast `allowed' as a signed long because vm_committed_space
- * sometimes has a negative value
- */
- if (atomic_long_read(&vm_committed_space) < (long)allowed)
+ if (percpu_counter_read_positive(&vm_committed_as) < allowed)
return 0;
error:
vm_unacct_memory(pages);
@@ -2477,6 +2473,10 @@ void mm_drop_all_locks(struct mm_struct
*/
void __init mmap_init(void)
{
+ int ret;
+
+ ret = percpu_counter_init(&vm_committed_as, 0);
+ VM_BUG_ON(ret);
vm_area_cachep = kmem_cache_create("vm_area_struct",
sizeof(struct vm_area_struct), 0,
SLAB_PANIC, NULL);
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -62,7 +62,7 @@ void *high_memory;
struct page *mem_map;
unsigned long max_mapnr;
unsigned long num_physpages;
-atomic_long_t vm_committed_space = ATOMIC_LONG_INIT(0);
+struct percpu_counter vm_committed_as;
int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */
int sysctl_overcommit_ratio = 50; /* default is 50% */
int sysctl_max_map_count = DEFAULT_MAX_MAP_COUNT;
@@ -463,6 +463,10 @@ SYSCALL_DEFINE1(brk, unsigned long, brk)
*/
void __init mmap_init(void)
{
+ int ret;
+
+ ret = percpu_counter_init(&vm_committed_as, 0);
+ VM_BUG_ON(ret);
vm_region_jar = kmem_cache_create("vm_region_jar",
sizeof(struct vm_region), 0,
SLAB_PANIC, NULL);
@@ -1849,12 +1853,9 @@ int __vm_enough_memory(struct mm_struct
if (mm)
allowed -= mm->total_vm / 32;
- /*
- * cast `allowed' as a signed long because vm_committed_space
- * sometimes has a negative value
- */
- if (atomic_long_read(&vm_committed_space) < (long)allowed)
+ if (percpu_counter_read_positive(&vm_committed_as) < allowed)
return 0;
+
error:
vm_unacct_memory(pages);
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -514,49 +514,6 @@ unsigned pagevec_lookup_tag(struct pagev
EXPORT_SYMBOL(pagevec_lookup_tag);
-#ifdef CONFIG_SMP
-/*
- * We tolerate a little inaccuracy to avoid ping-ponging the counter between
- * CPUs
- */
-#define ACCT_THRESHOLD max(16, NR_CPUS * 2)
-
-static DEFINE_PER_CPU(long, committed_space);
-
-void vm_acct_memory(long pages)
-{
- long *local;
-
- preempt_disable();
- local = &__get_cpu_var(committed_space);
- *local += pages;
- if (*local > ACCT_THRESHOLD || *local < -ACCT_THRESHOLD) {
- atomic_long_add(*local, &vm_committed_space);
- *local = 0;
- }
- preempt_enable();
-}
-
-#ifdef CONFIG_HOTPLUG_CPU
-
-/* Drop the CPU's cached committed space back into the central pool. */
-static int cpu_swap_callback(struct notifier_block *nfb,
- unsigned long action,
- void *hcpu)
-{
- long *committed;
-
- committed = &per_cpu(committed_space, (long)hcpu);
- if (action == CPU_DEAD || action == CPU_DEAD_FROZEN) {
- atomic_long_add(*committed, &vm_committed_space);
- *committed = 0;
- drain_cpu_pagevecs((long)hcpu);
- }
- return NOTIFY_OK;
-}
-#endif /* CONFIG_HOTPLUG_CPU */
-#endif /* CONFIG_SMP */
-
/*
* Perform any setup for the swap system
*/
@@ -577,7 +534,4 @@ void __init swap_setup(void)
* Right now other parts of the system means that we
* _really_ don't want to cluster much more
*/
-#ifdef CONFIG_HOTPLUG_CPU
- hotcpu_notifier(cpu_swap_callback, 0);
-#endif
}
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 55/58] rndis_wlan: fix initialization order for workqueue&workers
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (53 preceding siblings ...)
2009-05-06 21:46 ` [patch 54/58] mm: fix Committed_AS underflow on large NR_CPUS environment Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 21:46 ` [patch 56/58] sched: account system time properly Greg KH
` (4 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Jussi Kivilinna, John W. Linville
[-- Attachment #1: rndis_wlan-fix-initialization-order-for-workqueue-workers.patch --]
[-- Type: text/plain, Size: 2173 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
commit e805e4d0b53506dff4255a2792483f094e7fcd2c upstream.
rndis_wext_link_change() might be called from rndis_command() at
initialization stage and priv->workqueue/priv->work have not been
initialized yet. This causes invalid opcode at rndis_wext_bind on
some brands of bcm4320.
Fix by initializing workqueue/workers in rndis_wext_bind() before
rndis_command is used.
This bug has existed since 2.6.25, reported at:
http://bugzilla.kernel.org/show_bug.cgi?id=12794
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/rndis_wlan.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -2550,6 +2550,11 @@ static int rndis_wext_bind(struct usbnet
mutex_init(&priv->command_lock);
spin_lock_init(&priv->stats_lock);
+ /* because rndis_command() sleeps we need to use workqueue */
+ priv->workqueue = create_singlethread_workqueue("rndis_wlan");
+ INIT_WORK(&priv->work, rndis_wext_worker);
+ INIT_DELAYED_WORK(&priv->stats_work, rndis_update_wireless_stats);
+
/* try bind rndis_host */
retval = generic_rndis_bind(usbdev, intf, FLAG_RNDIS_PHYM_WIRELESS);
if (retval < 0)
@@ -2594,16 +2599,17 @@ static int rndis_wext_bind(struct usbnet
disassociate(usbdev, 1);
netif_carrier_off(usbdev->net);
- /* because rndis_command() sleeps we need to use workqueue */
- priv->workqueue = create_singlethread_workqueue("rndis_wlan");
- INIT_DELAYED_WORK(&priv->stats_work, rndis_update_wireless_stats);
queue_delayed_work(priv->workqueue, &priv->stats_work,
round_jiffies_relative(STATS_UPDATE_JIFFIES));
- INIT_WORK(&priv->work, rndis_wext_worker);
return 0;
fail:
+ cancel_delayed_work_sync(&priv->stats_work);
+ cancel_work_sync(&priv->work);
+ flush_workqueue(priv->workqueue);
+ destroy_workqueue(priv->workqueue);
+
kfree(priv);
return retval;
}
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 56/58] sched: account system time properly
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (54 preceding siblings ...)
2009-05-06 21:46 ` [patch 55/58] rndis_wlan: fix initialization order for workqueue&workers Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 21:46 ` [patch 57/58] tracing: x86, mmiotrace: fix range test Greg KH
` (3 subsequent siblings)
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Eric Dumazet, Martin Schwidefsky, rick.jones2, brice,
Paul Mackerras, Benjamin Herrenschmidt, Ingo Molnar
[-- Attachment #1: sched-account-system-time-properly.patch --]
[-- Type: text/plain, Size: 1876 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Eric Dumazet <dada1@cosmosbay.com>
commit f5f293a4e3d0a0c52cec31de6762c95050156516 upstream.
Andrew Gallatin reported that IRQ and SOFTIRQ times were
sometime not reported correctly on recent kernels, and even
bisected to commit 457533a7d3402d1d91fbc125c8bd1bd16dcd3cd4
([PATCH] fix scaled & unscaled cputime accounting) as the first
bad commit.
Further analysis pointed that commit
79741dd35713ff4f6fd0eafd59fa94e8a4ba922d ([PATCH] idle cputime
accounting) was the real cause of the problem.
account_process_tick() was not taking into account timer IRQ
interrupting the idle task servicing a hard or soft irq.
On mostly idle cpu, irqs were thus not accounted and top or
mpstat could tell user/admin that cpu was 100 % idle, 0.00 %
irq, 0.00 % softirq, while it was not.
[ Impact: fix occasionally incorrect CPU statistics in top/mpstat ]
Reported-by: Andrew Gallatin <gallatin@myri.com>
Re-reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: rick.jones2@hp.com
Cc: brice@myri.com
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
LKML-Reference: <49F84BC1.7080602@cosmosbay.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/sched.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4347,7 +4347,7 @@ void account_process_tick(struct task_st
if (user_tick)
account_user_time(p, one_jiffy, one_jiffy_scaled);
- else if (p != rq->idle)
+ else if ((p != rq->idle) || (irq_count() != HARDIRQ_OFFSET))
account_system_time(p, HARDIRQ_OFFSET, one_jiffy,
one_jiffy_scaled);
else
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 57/58] tracing: x86, mmiotrace: fix range test
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (55 preceding siblings ...)
2009-05-06 21:46 ` [patch 56/58] sched: account system time properly Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-06 22:12 ` Steven Rostedt
2009-05-06 21:46 ` [patch 58/58] ath9k: Fix FIF_BCN_PRBRESP_PROMISC handling Greg KH
` (2 subsequent siblings)
59 siblings, 1 reply; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, Stuart Bennett, Pekka Paalanen, Steven Rostedt, Ingo Molnar
[-- Attachment #1: tracing-x86-mmiotrace-fix-range-test.patch --]
[-- Type: text/plain, Size: 1066 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Stuart Bennett <stuart@freedesktop.org>
commit 33015c85995716d03f6293346cf05a1908b0fb9a upstream.
Matching on (addr == (p->addr + p->len)) causes problems when mappings
are adjacent.
[ Impact: fix mmiotrace confusion on adjacent iomaps ]
Signed-off-by: Stuart Bennett <stuart@freedesktop.org>
Acked-by: Pekka Paalanen <pq@iki.fi>
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <1240946271-7083-2-git-send-email-stuart@freedesktop.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/mm/kmmio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/x86/mm/kmmio.c
+++ b/arch/x86/mm/kmmio.c
@@ -87,7 +87,7 @@ static struct kmmio_probe *get_kmmio_pro
{
struct kmmio_probe *p;
list_for_each_entry_rcu(p, &kmmio_probes, list) {
- if (addr >= p->addr && addr <= (p->addr + p->len))
+ if (addr >= p->addr && addr < (p->addr + p->len))
return p;
}
return NULL;
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 58/58] ath9k: Fix FIF_BCN_PRBRESP_PROMISC handling
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (56 preceding siblings ...)
2009-05-06 21:46 ` [patch 57/58] tracing: x86, mmiotrace: fix range test Greg KH
@ 2009-05-06 21:46 ` Greg KH
2009-05-07 0:58 ` [patch 00/58] 2.6.29.3-stable review Stefan Lippers-Hollmann
2009-05-07 17:23 ` Chris Frey
59 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:46 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan, linux-wireless, Alina Friedrichsen, John W. Linville,
Jouni Malinen, Luis R. Rodriguez
[-- Attachment #1: ath9k-fix-fif_bcn_prbresp_promisc-handling.patch --]
[-- Type: text/plain, Size: 1586 bytes --]
2.6.29-stable review patch. If anyone has any objections, please let us know.
------------------
From: Luis R. Rodriguez <lrodriguez@Atheros.com>
This is a port of commit
91ed19f5f66a7fe544f0ec385e981f43491d1d5a
for 2.6.29.
Without this after scanning your device will set
the association ID to something bogus and what is
being reported is multicast/broadcast frame are not
being received. For details see this bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=498502
>From the original commit:
So that a new created IBSS network
doesn't break on the first scan.
It seems to Sujith and me that this
stupid code unnecessary, too.
So remove it...
Reported-by: David Woodhouse <dwmw2@infradead.org>
Tested-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Jouni Malinen <Jouni.Malinen@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/ath9k/main.c | 5 -----
1 file changed, 5 deletions(-)
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -2300,11 +2300,6 @@ static void ath9k_configure_filter(struc
rfilt = ath_calcrxfilter(sc);
ath9k_hw_setrxfilter(sc->sc_ah, rfilt);
- if (changed_flags & FIF_BCN_PRBRESP_PROMISC) {
- if (*total_flags & FIF_BCN_PRBRESP_PROMISC)
- ath9k_hw_write_associd(sc->sc_ah, ath_bcast_mac, 0);
- }
-
DPRINTF(sc, ATH_DBG_CONFIG, "Set HW RX filter: 0x%x\n", sc->rx.rxfilter);
}
^ permalink raw reply [flat|nested] 67+ messages in thread
* [patch 00/58] 2.6.29.3-stable review
@ 2009-05-06 21:50 ` Greg KH
2009-05-06 21:45 ` [patch 01/58] forcedeth: Fix resume from hibernation regression Greg KH
` (59 more replies)
0 siblings, 60 replies; 67+ messages in thread
From: Greg KH @ 2009-05-06 21:50 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,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan
This is the start of the stable review cycle for the 2.6.29.3 release.
There are 58 patches in this series, all will be posted as a response to
this one. If anyone has any issues with these being applied, please let
us know. If anyone is a maintainer of the proper subsystem, and wants
to add a Signed-off-by: line to the patch, please respond with it.
These patches are sent out with a number of different people on the Cc:
line. If you wish to be a reviewer, please email stable@kernel.org to
add your name to the list. If you want to be off the reviewer list,
also email us.
Responses should be made by Friday, May 8, 20:00:00 UTC. Anything
received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v2.6/stable-review/patch-2.6.29.3-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
Makefile | 2 +-
arch/powerpc/include/asm/processor.h | 19 ++++
arch/powerpc/kernel/signal.c | 4 +-
arch/powerpc/kernel/signal.h | 2 +-
arch/powerpc/kernel/signal_32.c | 4 +-
arch/powerpc/kernel/signal_64.c | 2 +-
arch/x86/kernel/xsave.c | 4 +-
arch/x86/kvm/mmu.c | 2 +-
arch/x86/kvm/x86.c | 5 +
arch/x86/mm/kmmio.c | 2 +-
arch/x86/pci/mmconfig-shared.c | 6 +-
block/genhd.c | 12 ++-
drivers/acpi/acpica/rscreate.c | 27 +-----
drivers/char/hw_random/virtio-rng.c | 4 +-
drivers/crypto/ixp4xx_crypto.c | 182 ++++++++++++----------------------
drivers/gpu/drm/i915/i915_drv.h | 4 +-
drivers/gpu/drm/i915/i915_reg.h | 1 +
drivers/gpu/drm/i915/intel_display.c | 9 ++
drivers/ide/cs5536.c | 1 +
drivers/net/b44.c | 2 +-
drivers/net/forcedeth.c | 3 +
drivers/net/mv643xx_eth.c | 24 +++--
drivers/net/wireless/ath5k/debug.c | 2 +-
drivers/net/wireless/ath9k/main.c | 5 -
drivers/net/wireless/b43/dma.c | 50 ++++++++--
drivers/net/wireless/rndis_wlan.c | 14 ++-
drivers/pci/dmar.c | 11 ++-
drivers/pci/intel-iommu.c | 8 ++-
drivers/pci/quirks.c | 1 +
drivers/platform/x86/thinkpad_acpi.c | 41 ++++----
drivers/usb/serial/usb-serial.c | 99 +++++++++++++------
drivers/usb/storage/unusual_devs.h | 6 +
fs/Makefile | 2 +-
fs/bio.c | 3 +
fs/compat.c | 27 +++++-
fs/exec.c | 43 +++++---
fs/fs_struct.c | 170 +++++++++++++++++++++++++++++++
fs/internal.h | 8 ++-
fs/namei.c | 7 --
fs/namespace.c | 60 -----------
fs/nfsd/nfssvc.c | 7 +-
fs/proc/array.c | 13 ++-
fs/proc/base.c | 55 ++++-------
fs/proc/meminfo.c | 2 +-
fs/proc/task_mmu.c | 4 +
fs/proc/task_nommu.c | 2 +-
include/drm/drm_pciids.h | 1 +
include/linux/fs_struct.h | 7 +-
include/linux/genhd.h | 1 +
include/linux/kvm.h | 2 +
include/linux/mman.h | 9 +-
include/linux/pci_regs.h | 2 +-
kernel/exec_domain.c | 22 ----
kernel/exit.c | 34 +------
kernel/fork.c | 62 +++++-------
kernel/ptrace.c | 4 +-
kernel/sched.c | 2 +-
kernel/time/tick-common.c | 12 ++-
mm/madvise.c | 8 ++
mm/mmap.c | 12 +-
mm/nommu.c | 13 ++-
mm/swap.c | 46 ---------
net/mac80211/mlme.c | 2 +-
net/mac80211/rx.c | 13 ++-
scripts/mod/modpost.c | 1 +
security/selinux/hooks.c | 1 +
sound/soc/codecs/wm8580.c | 2 +-
sound/usb/usx2y/us122l.c | 12 ++-
virt/kvm/kvm_main.c | 11 +-
69 files changed, 682 insertions(+), 558 deletions(-)
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: [patch 57/58] tracing: x86, mmiotrace: fix range test
2009-05-06 21:46 ` [patch 57/58] tracing: x86, mmiotrace: fix range test Greg KH
@ 2009-05-06 22:12 ` Steven Rostedt
0 siblings, 0 replies; 67+ messages in thread
From: Steven Rostedt @ 2009-05-06 22:12 UTC (permalink / raw)
To: Greg KH
Cc: linux-kernel, stable, Justin Forbes, Zwane Mwaikambo,
Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
Chris Wedgwood, Michael Krufky, Chuck Ebbert, Domenico Andreoli,
Willy Tarreau, Rodrigo Rubira Branco, Jake Edge, Eugene Teo,
torvalds, akpm, alan, Stuart Bennett, Pekka Paalanen, Ingo Molnar
On Wed, 6 May 2009, Greg KH wrote:
> 2.6.29-stable review patch. If anyone has any objections, please let us know.
>
> ------------------
>
> From: Stuart Bennett <stuart@freedesktop.org>
>
> commit 33015c85995716d03f6293346cf05a1908b0fb9a upstream.
>
> Matching on (addr == (p->addr + p->len)) causes problems when mappings
> are adjacent.
>
> [ Impact: fix mmiotrace confusion on adjacent iomaps ]
>
> Signed-off-by: Stuart Bennett <stuart@freedesktop.org>
> Acked-by: Pekka Paalanen <pq@iki.fi>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> LKML-Reference: <1240946271-7083-2-git-send-email-stuart@freedesktop.org>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
-- Steve
>
> ---
> arch/x86/mm/kmmio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/arch/x86/mm/kmmio.c
> +++ b/arch/x86/mm/kmmio.c
> @@ -87,7 +87,7 @@ static struct kmmio_probe *get_kmmio_pro
> {
> struct kmmio_probe *p;
> list_for_each_entry_rcu(p, &kmmio_probes, list) {
> - if (addr >= p->addr && addr <= (p->addr + p->len))
> + if (addr >= p->addr && addr < (p->addr + p->len))
> return p;
> }
> return NULL;
>
>
>
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: [patch 00/58] 2.6.29.3-stable review
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (57 preceding siblings ...)
2009-05-06 21:46 ` [patch 58/58] ath9k: Fix FIF_BCN_PRBRESP_PROMISC handling Greg KH
@ 2009-05-07 0:58 ` Stefan Lippers-Hollmann
2009-05-07 1:26 ` Greg KH
2009-05-07 17:23 ` Chris Frey
59 siblings, 1 reply; 67+ messages in thread
From: Stefan Lippers-Hollmann @ 2009-05-07 0:58 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel, stable
Hi
On Mittwoch, 6. Mai 2009, Greg KH wrote:
[...]
> The whole patch series can be found in one patch at:
> kernel.org/pub/linux/kernel/v2.6/stable-review/patch-2.6.29.3-rc1.gz
The actual patch seems to be missing, is there an issue with the mirroring?
$ LANG= wget kernel.org/pub/linux/kernel/v2.6/stable-review/patch-2.6.29.3-rc1.gz
--2009-05-07 00:32:03-- http://kernel.org/pub/linux/kernel/v2.6/stable-review/patch-2.6.29.3-rc1.gz
Resolving kernel.org... 149.20.20.133, 204.152.191.37
Connecting to kernel.org|149.20.20.133|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2009-05-07 00:32:03 ERROR 404: Not Found.
Regards
Stefan Lippers-Hollmann
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: [patch 00/58] 2.6.29.3-stable review
2009-05-07 0:58 ` [patch 00/58] 2.6.29.3-stable review Stefan Lippers-Hollmann
@ 2009-05-07 1:26 ` Greg KH
0 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-07 1:26 UTC (permalink / raw)
To: Stefan Lippers-Hollmann; +Cc: linux-kernel, stable
On Thu, May 07, 2009 at 02:58:10AM +0200, Stefan Lippers-Hollmann wrote:
> Hi
>
> On Mittwoch, 6. Mai 2009, Greg KH wrote:
> [...]
> > The whole patch series can be found in one patch at:
> > kernel.org/pub/linux/kernel/v2.6/stable-review/patch-2.6.29.3-rc1.gz
>
> The actual patch seems to be missing, is there an issue with the mirroring?
>
> $ LANG= wget kernel.org/pub/linux/kernel/v2.6/stable-review/patch-2.6.29.3-rc1.gz
> --2009-05-07 00:32:03-- http://kernel.org/pub/linux/kernel/v2.6/stable-review/patch-2.6.29.3-rc1.gz
> Resolving kernel.org... 149.20.20.133, 204.152.191.37
> Connecting to kernel.org|149.20.20.133|:80... connected.
> HTTP request sent, awaiting response... 404 Not Found
> 2009-05-07 00:32:03 ERROR 404: Not Found.
Doh, I forgot to upload it, sorry about that. Should be there in about
15 minutes.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: [patch 00/58] 2.6.29.3-stable review
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
` (58 preceding siblings ...)
2009-05-07 0:58 ` [patch 00/58] 2.6.29.3-stable review Stefan Lippers-Hollmann
@ 2009-05-07 17:23 ` Chris Frey
2009-05-07 17:49 ` Steve French
2009-05-07 22:13 ` Greg KH
59 siblings, 2 replies; 67+ messages in thread
From: Chris Frey @ 2009-05-07 17:23 UTC (permalink / raw)
To: Greg KH, chrisw, smfrench, jlayton
Cc: linux-kernel, stable, Justin Forbes, Zwane Mwaikambo,
Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
Chris Wedgwood, Michael Krufky, Chuck Ebbert, Domenico Andreoli,
Willy Tarreau, Rodrigo Rubira Branco, Jake Edge, Eugene Teo,
torvalds, akpm, alan
On Wed, May 06, 2009 at 02:50:17PM -0700, Greg KH wrote:
> This is the start of the stable review cycle for the 2.6.29.3 release.
> There are 58 patches in this series, all will be posted as a response to
> this one.
Maybe I'm missing something, but I don't see any of
the fs/cifs/connect.c security fixes from commits such as
f083def68f84b04fe3f97312498911afce79609e. I was hoping this would make
it into 2.6.29.3.
For reference, this was discussed on full-disclosure:
http://marc.info/?l=full-disclosure&m=123936563230145&w=2
(near the end of Andreas's post)
Jeff and Steve mentioned last week that they were working on other related
cleanups as well, that they hoped to push to stable.
Thanks,
- Chris
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: [patch 00/58] 2.6.29.3-stable review
2009-05-07 17:23 ` Chris Frey
@ 2009-05-07 17:49 ` Steve French
2009-05-07 22:13 ` Greg KH
1 sibling, 0 replies; 67+ messages in thread
From: Steve French @ 2009-05-07 17:49 UTC (permalink / raw)
To: Chris Frey, Suresh Jayaraman
Cc: Greg KH, chrisw, jlayton, linux-kernel, stable, Justin Forbes,
Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap, Dave Jones,
Chuck Wolber, Chris Wedgwood, Michael Krufky, Chuck Ebbert,
Domenico Andreoli, Willy Tarreau, Rodrigo Rubira Branco,
Jake Edge, Eugene Teo, torvalds, akpm, alan
On Thu, May 7, 2009 at 12:23 PM, Chris Frey <cdfrey@foursquare.net> wrote:
> On Wed, May 06, 2009 at 02:50:17PM -0700, Greg KH wrote:
>> This is the start of the stable review cycle for the 2.6.29.3 release.
>> There are 58 patches in this series, all will be posted as a response to
>> this one.
>
> Maybe I'm missing something, but I don't see any of
> the fs/cifs/connect.c security fixes from commits such as
> f083def68f84b04fe3f97312498911afce79609e. I was hoping this would make
> it into 2.6.29.3.
>
> For reference, this was discussed on full-disclosure:
> http://marc.info/?l=full-disclosure&m=123936563230145&w=2
> (near the end of Andreas's post)
>
> Jeff and Steve mentioned last week that they were working on other related
> cleanups as well, that they hoped to push to stable.
The cleanup and rewrite of some of the Unicode string handling functions was
too large for stable, but the potential buffer overrun fixes were small
enough to submit, had been collected (and cleaned up so that they
could merge) for stable submission by Suresh (Jeff and I acked
them over the last two days)
01-cifs-fix-buffer-size-for-nativeFileSystem
02-cifs-fix-temp-buffer-size-in-cifs_readdir
03-cifs-fix-dest-buffer-size-in-cifs_strncpy_to_host
04-cifs-fix-cifs_convertUCSpath
05-cifs-fix-unicode-string-alignment-in-session-setup
I am not aware of any others that are missing.
Suresh,
Are we missing any?
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: [patch 00/58] 2.6.29.3-stable review
2009-05-07 17:23 ` Chris Frey
2009-05-07 17:49 ` Steve French
@ 2009-05-07 22:13 ` Greg KH
2009-05-08 4:33 ` Suresh Jayaraman
1 sibling, 1 reply; 67+ messages in thread
From: Greg KH @ 2009-05-07 22:13 UTC (permalink / raw)
To: Chris Frey
Cc: chrisw, smfrench, jlayton, linux-kernel, stable, Justin Forbes,
Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap, Dave Jones,
Chuck Wolber, Chris Wedgwood, Michael Krufky, Chuck Ebbert,
Domenico Andreoli, Willy Tarreau, Rodrigo Rubira Branco,
Jake Edge, Eugene Teo, torvalds, akpm, alan
On Thu, May 07, 2009 at 01:23:04PM -0400, Chris Frey wrote:
> On Wed, May 06, 2009 at 02:50:17PM -0700, Greg KH wrote:
> > This is the start of the stable review cycle for the 2.6.29.3 release.
> > There are 58 patches in this series, all will be posted as a response to
> > this one.
>
> Maybe I'm missing something, but I don't see any of
> the fs/cifs/connect.c security fixes from commits such as
> f083def68f84b04fe3f97312498911afce79609e. I was hoping this would make
> it into 2.6.29.3.
No one sent them to stable@kernel.org for inclusion :(
> For reference, this was discussed on full-disclosure:
> http://marc.info/?l=full-disclosure&m=123936563230145&w=2
> (near the end of Andreas's post)
>
> Jeff and Steve mentioned last week that they were working on other related
> cleanups as well, that they hoped to push to stable.
That doesn't seem to have happened yet.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: [patch 00/58] 2.6.29.3-stable review
2009-05-07 22:13 ` Greg KH
@ 2009-05-08 4:33 ` Suresh Jayaraman
2009-05-08 5:13 ` Greg KH
0 siblings, 1 reply; 67+ messages in thread
From: Suresh Jayaraman @ 2009-05-08 4:33 UTC (permalink / raw)
To: Greg KH
Cc: Chris Frey, chrisw, smfrench, jlayton, linux-kernel, stable,
Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan
Greg KH wrote:
> On Thu, May 07, 2009 at 01:23:04PM -0400, Chris Frey wrote:
>> On Wed, May 06, 2009 at 02:50:17PM -0700, Greg KH wrote:
>>> This is the start of the stable review cycle for the 2.6.29.3 release.
>>> There are 58 patches in this series, all will be posted as a response to
>>> this one.
>> Maybe I'm missing something, but I don't see any of
>> the fs/cifs/connect.c security fixes from commits such as
>> f083def68f84b04fe3f97312498911afce79609e. I was hoping this would make
>> it into 2.6.29.3.
>
> No one sent them to stable@kernel.org for inclusion :(
Sorry, the patches were sent to cifs mailing list for
consensus/discussion and -stable inclusion request has not happened
(though Steve Cced stable the summary email with his ACK). I'm sending
the patches right away.. and hope it's not too late for 29.3
I have based the patches on top of 2.6.29.2.
Thanks,
--
Suresh Jayaraman
^ permalink raw reply [flat|nested] 67+ messages in thread
* Re: [patch 00/58] 2.6.29.3-stable review
2009-05-08 4:33 ` Suresh Jayaraman
@ 2009-05-08 5:13 ` Greg KH
0 siblings, 0 replies; 67+ messages in thread
From: Greg KH @ 2009-05-08 5:13 UTC (permalink / raw)
To: Suresh Jayaraman
Cc: Chris Frey, chrisw, smfrench, jlayton, linux-kernel, stable,
Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
Chuck Ebbert, Domenico Andreoli, Willy Tarreau,
Rodrigo Rubira Branco, Jake Edge, Eugene Teo, torvalds, akpm,
alan
On Fri, May 08, 2009 at 10:03:01AM +0530, Suresh Jayaraman wrote:
> Greg KH wrote:
> > On Thu, May 07, 2009 at 01:23:04PM -0400, Chris Frey wrote:
> >> On Wed, May 06, 2009 at 02:50:17PM -0700, Greg KH wrote:
> >>> This is the start of the stable review cycle for the 2.6.29.3 release.
> >>> There are 58 patches in this series, all will be posted as a response to
> >>> this one.
> >> Maybe I'm missing something, but I don't see any of
> >> the fs/cifs/connect.c security fixes from commits such as
> >> f083def68f84b04fe3f97312498911afce79609e. I was hoping this would make
> >> it into 2.6.29.3.
> >
> > No one sent them to stable@kernel.org for inclusion :(
>
> Sorry, the patches were sent to cifs mailing list for
> consensus/discussion and -stable inclusion request has not happened
> (though Steve Cced stable the summary email with his ACK). I'm sending
> the patches right away.. and hope it's not too late for 29.3
Yes, it's too late for .3, that review cycle started yesterday and will
be released tomorrow.
> I have based the patches on top of 2.6.29.2.
Thanks, we can always start a new review cycle on Friday with these if
needed.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 67+ messages in thread
end of thread, other threads:[~2009-05-08 5:19 UTC | newest]
Thread overview: 67+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20090506214528.660389067@mini.kroah.org>
2009-05-06 21:50 ` [patch 00/58] 2.6.29.3-stable review Greg KH
2009-05-06 21:45 ` [patch 01/58] forcedeth: Fix resume from hibernation regression Greg KH
2009-05-06 21:45 ` [patch 02/58] mac80211: Fix bug in getting rx status for frames pending in reorder buffer Greg KH
2009-05-06 21:45 ` [patch 03/58] b43: Poison RX buffers Greg KH
2009-05-06 21:45 ` [patch 04/58] b43: Refresh RX poison on buffer recycling Greg KH
2009-05-06 21:45 ` [patch 05/58] thinkpad-acpi: fix LED blinking through timer trigger Greg KH
2009-05-06 21:45 ` [patch 06/58] ALSA: us122l: add snd_us122l_free() Greg KH
2009-05-06 21:45 ` [patch 07/58] mac80211: fix basic rate bitmap calculation Greg KH
2009-05-06 21:45 ` [patch 08/58] KVM: MMU: Fix off-by-one calculating large page count Greg KH
2009-05-06 21:45 ` [patch 09/58] KVM: MMU: disable global page optimization Greg KH
2009-05-06 21:45 ` [patch 10/58] KVM: Fix overlapping check for memory slots Greg KH
2009-05-06 21:45 ` [patch 11/58] KVM: x86: release time_page on vcpu destruction Greg KH
2009-05-06 21:45 ` [patch 12/58] USB: Unusual Device support for Gold MP3 Player Energy Greg KH
2009-05-06 21:45 ` [patch 13/58] virtio-rng: Remove false BUG for spurious callbacks Greg KH
2009-05-06 21:45 ` [patch 14/58] b44: Use kernel DMA addresses for the kernel DMA API Greg KH
2009-05-06 21:45 ` [patch 15/58] block: include empty disks in /proc/diskstats Greg KH
2009-05-06 21:45 ` [patch 16/58] crypto: ixp4xx - Fix handling of chained sg buffers Greg KH
2009-05-06 21:45 ` [patch 17/58] exit_notify: kill the wrong capable(CAP_KILL) check (CVE-2009-1337) Greg KH
2009-05-06 21:45 ` [patch 18/58] PCI: fix incorrect mask of PM No_Soft_Reset bit Greg KH
2009-05-06 21:45 ` [patch 19/58] unreached code in selinux_ip_postroute_iptables_compat() (CVE-2009-1184) Greg KH
2009-05-06 21:45 ` [patch 20/58] drm/i915: add support for G41 chipset Greg KH
2009-05-06 21:45 ` [patch 21/58] x86-64: fix FPU corruption with signals and preemption Greg KH
2009-05-06 21:45 ` [patch 22/58] x86/PCI: dont call e820_all_mapped with -1 in the mmconfig case Greg KH
2009-05-06 21:45 ` [patch 23/58] ASoC: Fix offset of freqmode in WM8580 PLL configuration Greg KH
2009-05-06 21:45 ` [patch 24/58] PCI quirk: disable MSI on VIA VT3364 chipsets Greg KH
2009-05-06 21:45 ` [patch 25/58] bio: fix memcpy corruption in bio_copy_user_iov() Greg KH
2009-05-06 21:45 ` [patch 26/58] drm/i915: allow tiled front buffers on 965+ Greg KH
2009-05-06 21:45 ` [patch 27/58] pagemap: require aligned-length, non-null reads of /proc/pid/pagemap Greg KH
2009-05-06 21:45 ` [patch 28/58] kbuild: fix Module.markers permission error under cygwin Greg KH
2009-05-06 21:45 ` [patch 29/58] ptrace: ptrace_attach: fix the usage of ->cred_exec_mutex Greg KH
2009-05-06 21:45 ` [patch 30/58] USB: serial: fix lifetime and locking problems Greg KH
2009-05-06 21:45 ` [patch 31/58] ACPI: Revert conflicting workaround for BIOS w/ mangled PRT entries Greg KH
2009-05-06 21:46 ` [patch 32/58] powerpc: Sanitize stack pointer in signal handling code Greg KH
2009-05-06 21:46 ` [patch 33/58] compat_do_execve should unshare_files Greg KH
2009-05-06 21:46 ` [patch 34/58] fix setuid sometimes doesnt Greg KH
2009-05-06 21:46 ` [patch 35/58] fix setuid sometimes wouldnt Greg KH
2009-05-06 21:46 ` [patch 36/58] Annotate struct fs_structs usage count restriction Greg KH
2009-05-06 21:46 ` [patch 37/58] Kill unsharing fs_struct in __set_personality() Greg KH
2009-05-06 21:46 ` [patch 38/58] Get rid of bumping fs_struct refcount in pivot_root(2) Greg KH
2009-05-06 21:46 ` [patch 39/58] Take fs_struct handling to new file (fs/fs_struct.c) Greg KH
2009-05-06 21:46 ` [patch 40/58] New locking/refcounting for fs_struct Greg KH
2009-05-06 21:46 ` [patch 41/58] check_unsafe_exec() doesnt care about signal handlers sharing Greg KH
2009-05-06 21:46 ` [patch 42/58] do_execve() must not clear fs->in_exec if it was set by another thread Greg KH
2009-05-06 21:46 ` [patch 43/58] check_unsafe_exec: s/lock_task_sighand/rcu_read_lock/ Greg KH
2009-05-06 21:46 ` [patch 44/58] mv643xx_eth: 64bit mib counter read fix Greg KH
2009-05-06 21:46 ` [patch 45/58] mv643xx_eth: OOM handling fixes Greg KH
2009-05-06 21:46 ` [patch 46/58] ath5k: fix buffer overrun in rate debug code Greg KH
2009-05-06 21:46 ` [patch 47/58] proc: avoid information leaks to non-privileged processes Greg KH
2009-05-06 21:46 ` [patch 48/58] cs5536: define dma_sff_read_status() method Greg KH
2009-05-06 21:46 ` [patch 49/58] intel-iommu: Fix device-to-iommu mapping for PCI-PCI bridges Greg KH
2009-05-06 21:46 ` [patch 50/58] intel-iommu: Fix oops in device_to_iommu() when devices not found Greg KH
2009-05-06 21:46 ` [patch 51/58] intel-iommu: Avoid panic() for DRHD at address zero Greg KH
2009-05-06 21:46 ` [patch 52/58] clockevents: prevent endless loop in tick_handle_periodic() Greg KH
2009-05-06 21:46 ` [patch 53/58] Ignore madvise(MADV_WILLNEED) for hugetlbfs-backed regions Greg KH
2009-05-06 21:46 ` [patch 54/58] mm: fix Committed_AS underflow on large NR_CPUS environment Greg KH
2009-05-06 21:46 ` [patch 55/58] rndis_wlan: fix initialization order for workqueue&workers Greg KH
2009-05-06 21:46 ` [patch 56/58] sched: account system time properly Greg KH
2009-05-06 21:46 ` [patch 57/58] tracing: x86, mmiotrace: fix range test Greg KH
2009-05-06 22:12 ` Steven Rostedt
2009-05-06 21:46 ` [patch 58/58] ath9k: Fix FIF_BCN_PRBRESP_PROMISC handling Greg KH
2009-05-07 0:58 ` [patch 00/58] 2.6.29.3-stable review Stefan Lippers-Hollmann
2009-05-07 1:26 ` Greg KH
2009-05-07 17:23 ` Chris Frey
2009-05-07 17:49 ` Steve French
2009-05-07 22:13 ` Greg KH
2009-05-08 4:33 ` Suresh Jayaraman
2009-05-08 5:13 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox