Linux 3.0.99
Greg KH
maintainer------------------------------
NOTE! The 3.0.x kernel series will be moving to End-Of-Life soon, within a few weeks. Please move anything that is relying on this kernel version to the other longterm kernel releases (3.4.x or 3.10.x) as soon as possible. If anyone has any questions about this, please let me know.
------------------------------
I'm announcing the release of the 3.0.99 kernel.
All users of the 3.0 kernel series must upgrade.
The updated 3.0.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.0.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 +- arch/x86/kernel/reboot.c | 16 ++++++++++++++++ arch/x86/platform/efi/efi.c | 11 +++++++---- drivers/gpu/drm/i915/intel_dp.c | 13 ++++++++++++- drivers/hwmon/applesmc.c | 19 ++++++++++++++++--- drivers/md/dm-snap-persistent.c | 2 +- drivers/md/dm-snap.c | 5 ++--- drivers/staging/vt6656/main_usb.c | 3 ++- drivers/usb/core/devio.c | 16 ++++++++++++++++ drivers/usb/host/xhci-ring.c | 14 ++++++++++++-- fs/splice.c | 35 ++++++++++++++++++++--------------- include/linux/splice.h | 8 ++++---- kernel/relay.c | 5 +++-- kernel/trace/trace.c | 6 ++++-- net/core/skbuff.c | 3 ++- 15 files changed, 118 insertions(+), 40 deletions(-)
Eric Dumazet (1):
splice: fix racy pipe->buffers uses
Florian Wolter (1):
xhci: Fix race between ep halt and URB cancellation
Greg Kroah-Hartman (1):
Linux 3.0.99
Henrik Rydberg (2):
hwmon: (applesmc) Check key count before proceeding
hwmon: (applesmc) Silence uninitialized warnings
Jani Nikula (1):
drm/i915/dp: increase i2c-over-aux retry interval on AUX DEFER
Josh Boyer (1):
x86, efi: Don't map Boot Services on i386
Kurt Garloff (1):
usb/core/devio.c: Don't reject control message to endpoint with wrong direction bit
Malcolm Priestley (1):
staging: vt6656: [BUG] main_usb.c oops on device_close move flag earlier.
Masoud Sharbiani (1):
x86/reboot: Add quirk to make Dell C6100 use reboot=pci automatically
Mathias Nyman (1):
xhci: Fix oops happening after address device timeout
Mikulas Patocka (2):
dm snapshot: workaround for a false positive lockdep warning
dm-snapshot: fix performance degradation due to small hash size
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 0 -SUBLEVEL = 98 +SUBLEVEL = 99 EXTRAVERSION = NAME = Sneaky Weasel
arch/x86/kernel/reboot.c +16 -0
@@ -460,6 +460,22 @@ static struct dmi_system_id __initdata pci_reboot_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Precision M6600"), }, }, + { /* Handle problems with rebooting on the Dell PowerEdge C6100. */ + .callback = set_pci_reboot, + .ident = "Dell PowerEdge C6100", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "C6100"), + }, + }, + {/* Some C6100 machines were shipped with vendor being 'Dell'. */ + .callback = set_pci_reboot, + .ident = "Dell PowerEdge C6100", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell"), + DMI_MATCH(DMI_PRODUCT_NAME, "C6100"), + }, + }, { } };
arch/x86/platform/efi/efi.c +7 -4
@@ -588,10 +588,13 @@ void __init efi_enter_virtual_mode(void)for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) { md = p; -if (!(md->attribute &EFI_MEMORY_RUNTIME ) && - md->type !=EFI_BOOT_SERVICES_CODE && - md->type !=EFI_BOOT_SERVICES_DATA ) -continue ; +if (!(md->attribute &EFI_MEMORY_RUNTIME )) { +#ifdef CONFIG_X86_64 +if (md->type !=EFI_BOOT_SERVICES_CODE && + md->type != EFI_BOOT_SERVICES_DATA) +#endif +continue ; + } size = md->num_pages <<EFI_PAGE_SHIFT ; end = md->phys_addr + size;
drivers/gpu/drm/i915/intel_dp.c +12 -1
@@ -531,7 +531,18 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,DRM_DEBUG_KMS ("aux_ch native nack\n" );return -EREMOTEIO ;case AUX_NATIVE_REPLY_DEFER : -udelay (100 ); +/* +* For now, just give more slack to branch devices. We +* could check the DPCD for I2C bit rate capabilities, +* and if available, adjust the interval. We could also +* be more careful with DP-to-Legacy adapters where a +* long legacy cable may force very low I2C bit rates. +*/ +if (intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT ] & +DP_DWN_STRM_PORT_PRESENT ) +usleep_range (500 ,600 ); +else +usleep_range (300 ,400 );continue ;default : DRM_ERROR("aux_ch invalid native reply 0x%02x\n",
drivers/hwmon/applesmc.c +16 -3
@@ -344,8 +344,10 @@ static int applesmc_get_lower_bound(unsigned int *lo, const char *key)while (begin != end) {int middle = begin + (end - begin) /2 ; entry =applesmc_get_entry_by_index (middle); -if (IS_ERR (entry)) +if (IS_ERR (entry)) { + *lo =0 ;return PTR_ERR (entry); + }if (strcmp (entry->key, key) <0 ) begin = middle +1 ;else
@@ -364,8 +366,10 @@ static int applesmc_get_upper_bound(unsigned int *hi, const char *key)while (begin != end) {int middle = begin + (end - begin) /2 ; entry =applesmc_get_entry_by_index (middle); -if (IS_ERR (entry)) +if (IS_ERR (entry)) { + *hi = smcreg.key_count;return PTR_ERR (entry); + }if (strcmp (key, entry->key) <0 ) end = middle;else
@@ -485,16 +489,25 @@ static int applesmc_init_smcreg_try(void) {struct applesmc_registers *s = &smcreg;bool left_light_sensor, right_light_sensor; +unsigned int count;u8 tmp[1 ];int ret;if (s->init_complete)return 0 ; - ret =read_register_count (&s->key_count); + ret =read_register_count (&count);if (ret)return ret; +if (s->cache && s->key_count != count) { +pr_warn ("key count changed from %d to %d\n" , + s->key_count, count); +kfree (s->cache); + s->cache =NULL ; + } + s->key_count = count; +if (!s->cache) s->cache =kcalloc (s->key_count,sizeof (*s->cache),GFP_KERNEL );if (!s->cache)
drivers/md/dm-snap-persistent.c +1 -1
@@ -251,7 +251,7 @@ static int chunk_io(struct pstore *ps, void *area, chunk_t chunk, int rw,*/ INIT_WORK_ONSTACK (&req.work, do_metadata);queue_work (ps->metadata_wq, &req.work); -flush_work (&req.work); +flush_workqueue (ps->metadata_wq);return req.result; }
drivers/md/dm-snap.c +2 -3
@@ -724,17 +724,16 @@ static int calc_max_buckets(void)*/ static int init_hash_tables (struct dm_snapshot *s) { -sector_t hash_size, cow_dev_size, origin_dev_size, max_buckets; +sector_t hash_size, cow_dev_size, max_buckets;/* * Calculate based on the size of the original volume or * the COW volume... */ cow_dev_size =get_dev_size (s->cow->bdev); - origin_dev_size =get_dev_size (s->origin->bdev); max_buckets =calc_max_buckets (); - hash_size =min (origin_dev_size, cow_dev_size) >> s->store->chunk_shift; + hash_size = cow_dev_size >> s->store->chunk_shift; hash_size =min (hash_size, max_buckets);if (hash_size <64 )
drivers/staging/vt6656/main_usb.c +2 -1
@@ -1228,6 +1228,8 @@ device_release_WPADEV(pDevice);memset (pMgmt->abyCurrBSSID,0 ,6 ); pMgmt->eCurrState =WMAC_STATE_IDLE ; + pDevice->flags &= ~DEVICE_FLAGS_OPENED ; +device_free_tx_bufs (pDevice);device_free_rx_bufs (pDevice);device_free_int_bufs (pDevice);
@@ -1239,7 +1241,6 @@ device_release_WPADEV(pDevice);usb_free_urb (pDevice->pInterruptURB);BSSvClearNodeDBTable (pDevice,0 ); - pDevice->flags &=(~DEVICE_FLAGS_OPENED );DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "device_close2 \n" );
drivers/usb/core/devio.c +16 -0
@@ -645,6 +645,22 @@ static int check_ctrlrecip(struct dev_state *ps, unsigned int requesttype,if ((index & ~USB_DIR_IN ) ==0 )return 0 ; ret =findintfep (ps->dev, index); +if (ret <0 ) { +/* +* Some not fully compliant Win apps seem to get +* index wrong and have the endpoint number here +* rather than the endpoint address (with the +* correct direction). Win does let this through, +* so we'll not reject it here but leave it to +* the device to not break KVM. But we warn. +*/ + ret =findintfep (ps->dev, index ^0x80 ); +if (ret >=0 ) +dev_info (&ps->dev->dev, +"%s: process %i (%s) requesting ep %02x but needs %02x\n" , + __func__,task_pid_nr (current), + current->comm, index, index ^0x80 ); + }if (ret >=0 ) ret =checkintf (ps, ret);break ;
drivers/usb/host/xhci-ring.c +12 -2
@@ -882,8 +882,12 @@ remove_finished_td:/* Otherwise ring the doorbell(s) to restart queued transfers */ ring_doorbell_for_active_rings (xhci, slot_id, ep_index); } - ep->stopped_td =NULL ; - ep->stopped_trb =NULL ; + +/* Clear stopped_td and stopped_trb if endpoint is not halted */ +if (!(ep->ep_state &EP_HALTED )) { + ep->stopped_td =NULL ; + ep->stopped_trb =NULL ; + }/* * Drop the lock and complete the URBs in the cancelled TD list.
@@ -1377,6 +1381,12 @@ static void handle_cmd_completion(struct xhci_hcd *xhci,inc_deq (xhci, xhci->cmd_ring, false);return ; } +/* There is no command to handle if we get a stop event when the +* command ring is empty, event->cmd_trb points to the next +* unset command +*/ +if (xhci->cmd_ring->dequeue == xhci->cmd_ring->enqueue) +return ; } switch (le32_to_cpu(xhci->cmd_ring->dequeue->generic.field[3])
fs/splice.c +20 -15
@@ -274,13 +274,16 @@ static void spd_release_page(struct splice_pipe_desc *spd, unsigned int i)* Check if we need to grow the arrays holding pages and partial page * descriptions. */ -int splice_grow_spd (struct pipe_inode_info *pipe,struct splice_pipe_desc *spd) +int splice_grow_spd (const struct pipe_inode_info *pipe,struct splice_pipe_desc *spd) { -if (pipe->buffers <=PIPE_DEF_BUFFERS ) +unsigned int buffers =ACCESS_ONCE (pipe->buffers); + + spd->nr_pages_max = buffers; +if (buffers <=PIPE_DEF_BUFFERS )return 0 ; - spd->pages =kmalloc (pipe->buffers *sizeof (struct page *),GFP_KERNEL ); - spd->partial =kmalloc (pipe->buffers *sizeof (struct partial_page ),GFP_KERNEL ); + spd->pages =kmalloc (buffers *sizeof (struct page *),GFP_KERNEL ); + spd->partial =kmalloc (buffers *sizeof (struct partial_page ),GFP_KERNEL );if (spd->pages && spd->partial)return 0 ;
@@ -290,10 +293,9 @@ int splice_grow_spd(struct pipe_inode_info *pipe, struct splice_pipe_desc *spd)return -ENOMEM ; } -void splice_shrink_spd (struct pipe_inode_info *pipe, -struct splice_pipe_desc *spd) +void splice_shrink_spd (struct splice_pipe_desc *spd) { -if (pipe->buffers <=PIPE_DEF_BUFFERS ) +if (spd->nr_pages_max <=PIPE_DEF_BUFFERS )return ;kfree (spd->pages);
@@ -316,6 +318,7 @@ __generic_file_splice_read(struct file *in, loff_t *ppos,struct splice_pipe_desc spd = { .pages = pages, .partial = partial, + .nr_pages_max =PIPE_DEF_BUFFERS , .flags = flags, .ops = &page_cache_pipe_buf_ops, .spd_release = spd_release_page,
@@ -327,7 +330,7 @@ __generic_file_splice_read(struct file *in, loff_t *ppos, index = *ppos >>PAGE_CACHE_SHIFT ; loff = *ppos & ~PAGE_CACHE_MASK ; req_pages = (len + loff +PAGE_CACHE_SIZE -1 ) >>PAGE_CACHE_SHIFT ; - nr_pages =min (req_pages, pipe->buffers); + nr_pages =min (req_pages, spd.nr_pages_max);/* * Lookup the (hopefully) full range of pages we need.
@@ -498,7 +501,7 @@ fill_it:if (spd.nr_pages) error =splice_to_pipe (pipe, &spd); -splice_shrink_spd (pipe, &spd); +splice_shrink_spd (&spd);return error; }
@@ -599,6 +602,7 @@ ssize_t default_file_splice_read(struct file *in, loff_t *ppos,struct splice_pipe_desc spd = { .pages = pages, .partial = partial, + .nr_pages_max =PIPE_DEF_BUFFERS , .flags = flags, .ops = &default_pipe_buf_ops, .spd_release = spd_release_page,
@@ -609,8 +613,8 @@ ssize_t default_file_splice_read(struct file *in, loff_t *ppos, res = -ENOMEM ; vec = __vec; -if (pipe->buffers >PIPE_DEF_BUFFERS ) { - vec =kmalloc (pipe->buffers *sizeof (struct iovec ),GFP_KERNEL ); +if (spd.nr_pages_max >PIPE_DEF_BUFFERS ) { + vec =kmalloc (spd.nr_pages_max *sizeof (struct iovec ),GFP_KERNEL );if (!vec) goto shrink_ret; }
@@ -618,7 +622,7 @@ ssize_t default_file_splice_read(struct file *in, loff_t *ppos, offset = *ppos & ~PAGE_CACHE_MASK ; nr_pages = (len + offset +PAGE_CACHE_SIZE -1 ) >>PAGE_CACHE_SHIFT ; -for (i =0 ; i < nr_pages && i < pipe->buffers && len; i++) { +for (i =0 ; i < nr_pages && i < spd.nr_pages_max && len; i++) {struct page *page; page =alloc_page (GFP_USER );
@@ -666,7 +670,7 @@ ssize_t default_file_splice_read(struct file *in, loff_t *ppos, shrink_ret:if (vec != __vec)kfree (vec); -splice_shrink_spd (pipe, &spd); +splice_shrink_spd (&spd);return res; err:
@@ -1618,6 +1622,7 @@ static long vmsplice_to_pipe(struct file *file, const struct iovec __user *iov,struct splice_pipe_desc spd = { .pages = pages, .partial = partial, + .nr_pages_max =PIPE_DEF_BUFFERS , .flags = flags, .ops = &user_page_pipe_buf_ops, .spd_release = spd_release_page,
@@ -1633,13 +1638,13 @@ static long vmsplice_to_pipe(struct file *file, const struct iovec __user *iov, spd.nr_pages =get_iovec_page_array (iov, nr_segs, spd.pages, spd.partial, flags &SPLICE_F_GIFT , - pipe->buffers); + spd.nr_pages_max);if (spd.nr_pages <=0 ) ret = spd.nr_pages;else ret =splice_to_pipe (pipe, &spd); -splice_shrink_spd (pipe, &spd); +splice_shrink_spd (&spd);return ret; }
include/linux/splice.h +4 -4
@@ -51,7 +51,8 @@ struct partial_page {struct splice_pipe_desc {struct page **pages;/* page map */ struct partial_page *partial;/* pages[] may not be contig */ -int nr_pages;/* number of pages in map */ +int nr_pages;/* number of populated pages in map */ +unsigned int nr_pages_max;/* pages[] & partial[] arrays size */ unsigned int flags;/* splice flags */ const struct pipe_buf_operations *ops;/* ops associated with output pipe */ void (*spd_release)(struct splice_pipe_desc *,unsigned int );
@@ -85,8 +86,7 @@ extern ssize_t splice_direct_to_actor(struct file *, struct splice_desc *,/* * for dynamic pipe sizing */ -extern int splice_grow_spd (struct pipe_inode_info *,struct splice_pipe_desc *); -extern void splice_shrink_spd (struct pipe_inode_info *, -struct splice_pipe_desc *); +extern int splice_grow_spd (const struct pipe_inode_info *,struct splice_pipe_desc *); +extern void splice_shrink_spd (struct splice_pipe_desc *);#endif
kernel/relay.c +3 -2
@@ -1235,6 +1235,7 @@ static ssize_t subbuf_splice_actor(struct file *in,struct splice_pipe_desc spd = { .pages = pages, .nr_pages =0 , + .nr_pages_max =PIPE_DEF_BUFFERS , .partial = partial, .flags = flags, .ops = &relay_pipe_buf_ops,
@@ -1302,8 +1303,8 @@ static ssize_t subbuf_splice_actor(struct file *in, ret += padding; out: -splice_shrink_spd (pipe, &spd); -return ret; +splice_shrink_spd (&spd); +return ret; } static ssize_t relay_file_splice_read(struct file *in,
kernel/trace/trace.c +4 -2
@@ -3364,6 +3364,7 @@ static ssize_t tracing_splice_read_pipe(struct file *filp, .pages = pages_def, .partial = partial_def, .nr_pages = 0, /* This gets updated below. */ + .nr_pages_max = PIPE_DEF_BUFFERS, .flags = flags, .ops = &tracing_pipe_buf_ops, .spd_release = tracing_spd_release_pipe,
@@ -3435,7 +3436,7 @@ static ssize_t tracing_splice_read_pipe(struct file *filp, ret =splice_to_pipe (pipe, &spd); out: -splice_shrink_spd (pipe, &spd); +splice_shrink_spd (&spd);return ret; out_err:
@@ -3848,6 +3849,7 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos,struct splice_pipe_desc spd = { .pages = pages_def, .partial = partial_def, + .nr_pages_max =PIPE_DEF_BUFFERS , .flags = flags, .ops = &buffer_pipe_buf_ops, .spd_release = buffer_spd_release,
@@ -3936,7 +3938,7 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos, } ret =splice_to_pipe (pipe, &spd); -splice_shrink_spd (pipe, &spd); +splice_shrink_spd (&spd); out:return ret; }
net/core/skbuff.c +2 -1
@@ -1535,6 +1535,7 @@ int skb_splice_bits(struct sk_buff *skb, unsigned int offset,struct splice_pipe_desc spd = { .pages = pages, .partial = partial, + .nr_pages_max =MAX_SKB_FRAGS , .flags = flags, .ops = &sock_pipe_buf_ops, .spd_release = sock_spd_release,
@@ -1581,7 +1582,7 @@ done:lock_sock (sk); } -splice_shrink_spd (pipe, &spd); +splice_shrink_spd (&spd);return ret; }