Commit d59fdcf2 authored by Ingo Molnar's avatar Ingo Molnar

Merge commit 'v2.6.26' into x86/core

parents 2387ce57 bce7f793
...@@ -377,7 +377,7 @@ Bug Reporting ...@@ -377,7 +377,7 @@ Bug Reporting
bugzilla.kernel.org is where the Linux kernel developers track kernel bugzilla.kernel.org is where the Linux kernel developers track kernel
bugs. Users are encouraged to report all bugs that they find in this bugs. Users are encouraged to report all bugs that they find in this
tool. For details on how to use the kernel bugzilla, please see: tool. For details on how to use the kernel bugzilla, please see:
http://test.kernel.org/bugzilla/faq.html http://bugzilla.kernel.org/page.cgi?id=faq.html
The file REPORTING-BUGS in the main kernel source directory has a good The file REPORTING-BUGS in the main kernel source directory has a good
template for how to report a possible kernel bug, and details what kind template for how to report a possible kernel bug, and details what kind
......
...@@ -3088,8 +3088,8 @@ L: linux-scsi@vger.kernel.org ...@@ -3088,8 +3088,8 @@ L: linux-scsi@vger.kernel.org
S: Maintained S: Maintained
OPROFILE OPROFILE
P: Philippe Elie P: Robert Richter
M: phil.el@wanadoo.fr M: robert.richter@amd.com
L: oprofile-list@lists.sf.net L: oprofile-list@lists.sf.net
S: Maintained S: Maintained
......
VERSION = 2 VERSION = 2
PATCHLEVEL = 6 PATCHLEVEL = 6
SUBLEVEL = 26 SUBLEVEL = 26
EXTRAVERSION = -rc9 EXTRAVERSION =
NAME = Rotary Wombat NAME = Rotary Wombat
# *DOCUMENTATION* # *DOCUMENTATION*
......
...@@ -709,11 +709,12 @@ static void bsg_kref_release_function(struct kref *kref) ...@@ -709,11 +709,12 @@ static void bsg_kref_release_function(struct kref *kref)
{ {
struct bsg_class_device *bcd = struct bsg_class_device *bcd =
container_of(kref, struct bsg_class_device, ref); container_of(kref, struct bsg_class_device, ref);
struct device *parent = bcd->parent;
if (bcd->release) if (bcd->release)
bcd->release(bcd->parent); bcd->release(bcd->parent);
put_device(bcd->parent); put_device(parent);
} }
static int bsg_put_device(struct bsg_device *bd) static int bsg_put_device(struct bsg_device *bd)
......
...@@ -590,8 +590,10 @@ static struct ipw_rx_packet *pool_allocate(struct ipw_hardware *hw, ...@@ -590,8 +590,10 @@ static struct ipw_rx_packet *pool_allocate(struct ipw_hardware *hw,
packet = kmalloc(sizeof(struct ipw_rx_packet) + packet = kmalloc(sizeof(struct ipw_rx_packet) +
old_packet->length + minimum_free_space, old_packet->length + minimum_free_space,
GFP_ATOMIC); GFP_ATOMIC);
if (!packet) if (!packet) {
kfree(old_packet);
return NULL; return NULL;
}
memcpy(packet, old_packet, memcpy(packet, old_packet,
sizeof(struct ipw_rx_packet) sizeof(struct ipw_rx_packet)
+ old_packet->length); + old_packet->length);
......
...@@ -1977,8 +1977,10 @@ isdn_writebuf_stub(int drvidx, int chan, const u_char __user * buf, int len) ...@@ -1977,8 +1977,10 @@ isdn_writebuf_stub(int drvidx, int chan, const u_char __user * buf, int len)
if (!skb) if (!skb)
return -ENOMEM; return -ENOMEM;
skb_reserve(skb, hl); skb_reserve(skb, hl);
if (copy_from_user(skb_put(skb, len), buf, len)) if (copy_from_user(skb_put(skb, len), buf, len)) {
dev_kfree_skb(skb);
return -EFAULT; return -EFAULT;
}
ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, 1, skb); ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, 1, skb);
if (ret <= 0) if (ret <= 0)
dev_kfree_skb(skb); dev_kfree_skb(skb);
......
...@@ -406,8 +406,10 @@ static int ov7670_read(struct i2c_client *c, unsigned char reg, ...@@ -406,8 +406,10 @@ static int ov7670_read(struct i2c_client *c, unsigned char reg,
int ret; int ret;
ret = i2c_smbus_read_byte_data(c, reg); ret = i2c_smbus_read_byte_data(c, reg);
if (ret >= 0) if (ret >= 0) {
*value = (unsigned char) ret; *value = (unsigned char) ret;
ret = 0;
}
return ret; return ret;
} }
......
...@@ -1686,9 +1686,14 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -1686,9 +1686,14 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
ioc->bus_type = SAS; ioc->bus_type = SAS;
} }
if (ioc->bus_type == SAS && mpt_msi_enable == -1) if (mpt_msi_enable == -1) {
ioc->msi_enable = 1; /* Enable on SAS, disable on FC and SPI */
else if (ioc->bus_type == SAS)
ioc->msi_enable = 1;
else
ioc->msi_enable = 0;
} else
/* follow flag: 0 - disable; 1 - enable */
ioc->msi_enable = mpt_msi_enable; ioc->msi_enable = mpt_msi_enable;
if (ioc->errata_flag_1064) if (ioc->errata_flag_1064)
......
...@@ -1266,13 +1266,18 @@ mptspi_dv_renegotiate(struct _MPT_SCSI_HOST *hd) ...@@ -1266,13 +1266,18 @@ mptspi_dv_renegotiate(struct _MPT_SCSI_HOST *hd)
static int static int
mptspi_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) mptspi_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
{ {
struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh);
int rc; int rc;
rc = mptscsih_ioc_reset(ioc, reset_phase); rc = mptscsih_ioc_reset(ioc, reset_phase);
if (reset_phase == MPT_IOC_POST_RESET) /* only try to do a renegotiation if we're properly set up
* if we get an ioc fault on bringup, ioc->sh will be NULL */
if (reset_phase == MPT_IOC_POST_RESET &&
ioc->sh) {
struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh);
mptspi_dv_renegotiate(hd); mptspi_dv_renegotiate(hd);
}
return rc; return rc;
} }
......
...@@ -55,7 +55,7 @@ struct fm3130 { ...@@ -55,7 +55,7 @@ struct fm3130 {
int alarm; int alarm;
}; };
static const struct i2c_device_id fm3130_id[] = { static const struct i2c_device_id fm3130_id[] = {
{ "fm3130-rtc", 0 }, { "fm3130", 0 },
{ } { }
}; };
MODULE_DEVICE_TABLE(i2c, fm3130_id); MODULE_DEVICE_TABLE(i2c, fm3130_id);
......
...@@ -302,6 +302,7 @@ static int pcf8563_remove(struct i2c_client *client) ...@@ -302,6 +302,7 @@ static int pcf8563_remove(struct i2c_client *client)
static const struct i2c_device_id pcf8563_id[] = { static const struct i2c_device_id pcf8563_id[] = {
{ "pcf8563", 0 }, { "pcf8563", 0 },
{ "rtc8564", 0 },
{ } { }
}; };
MODULE_DEVICE_TABLE(i2c, pcf8563_id); MODULE_DEVICE_TABLE(i2c, pcf8563_id);
......
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include <linux/libata.h> #include <linux/libata.h>
#include <linux/hdreg.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/processor.h> #include <asm/processor.h>
...@@ -4913,8 +4914,11 @@ static int ipr_ioctl(struct scsi_device *sdev, int cmd, void __user *arg) ...@@ -4913,8 +4914,11 @@ static int ipr_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)
struct ipr_resource_entry *res; struct ipr_resource_entry *res;
res = (struct ipr_resource_entry *)sdev->hostdata; res = (struct ipr_resource_entry *)sdev->hostdata;
if (res && ipr_is_gata(res)) if (res && ipr_is_gata(res)) {
if (cmd == HDIO_GET_IDENTITY)
return -ENOTTY;
return ata_scsi_ioctl(sdev, cmd, arg); return ata_scsi_ioctl(sdev, cmd, arg);
}
return -EINVAL; return -EINVAL;
} }
......
...@@ -207,6 +207,15 @@ int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, ...@@ -207,6 +207,15 @@ int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd,
*/ */
blk_execute_rq(req->q, NULL, req, 1); blk_execute_rq(req->q, NULL, req, 1);
/*
* Some devices (USB mass-storage in particular) may transfer
* garbage data together with a residue indicating that the data
* is invalid. Prevent the garbage from being misinterpreted
* and prevent security leaks by zeroing out the excess data.
*/
if (unlikely(req->data_len > 0 && req->data_len <= bufflen))
memset(buffer + (bufflen - req->data_len), 0, req->data_len);
ret = req->errors; ret = req->errors;
out: out:
blk_put_request(req); blk_put_request(req);
......
...@@ -2623,6 +2623,9 @@ static struct console serial8250_console = { ...@@ -2623,6 +2623,9 @@ static struct console serial8250_console = {
static int __init serial8250_console_init(void) static int __init serial8250_console_init(void)
{ {
if (nr_uarts > UART_NR)
nr_uarts = UART_NR;
serial8250_isa_init_ports(); serial8250_isa_init_ports();
register_console(&serial8250_console); register_console(&serial8250_console);
return 0; return 0;
......
...@@ -74,6 +74,7 @@ static int fb_deferred_io_mkwrite(struct vm_area_struct *vma, ...@@ -74,6 +74,7 @@ static int fb_deferred_io_mkwrite(struct vm_area_struct *vma,
{ {
struct fb_info *info = vma->vm_private_data; struct fb_info *info = vma->vm_private_data;
struct fb_deferred_io *fbdefio = info->fbdefio; struct fb_deferred_io *fbdefio = info->fbdefio;
struct page *cur;
/* this is a callback we get when userspace first tries to /* this is a callback we get when userspace first tries to
write to the page. we schedule a workqueue. that workqueue write to the page. we schedule a workqueue. that workqueue
...@@ -83,7 +84,24 @@ static int fb_deferred_io_mkwrite(struct vm_area_struct *vma, ...@@ -83,7 +84,24 @@ static int fb_deferred_io_mkwrite(struct vm_area_struct *vma,
/* protect against the workqueue changing the page list */ /* protect against the workqueue changing the page list */
mutex_lock(&fbdefio->lock); mutex_lock(&fbdefio->lock);
list_add(&page->lru, &fbdefio->pagelist);
/* we loop through the pagelist before adding in order
to keep the pagelist sorted */
list_for_each_entry(cur, &fbdefio->pagelist, lru) {
/* this check is to catch the case where a new
process could start writing to the same page
through a new pte. this new access can cause the
mkwrite even when the original ps's pte is marked
writable */
if (unlikely(cur == page))
goto page_already_added;
else if (cur->index > page->index)
break;
}
list_add_tail(&page->lru, &cur->lru);
page_already_added:
mutex_unlock(&fbdefio->lock); mutex_unlock(&fbdefio->lock);
/* come back after delay to process the deferred IO */ /* come back after delay to process the deferred IO */
......
...@@ -34,11 +34,11 @@ ...@@ -34,11 +34,11 @@
static struct cifs_wksid wksidarr[NUM_WK_SIDS] = { static struct cifs_wksid wksidarr[NUM_WK_SIDS] = {
{{1, 0, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0} }, "null user"}, {{1, 0, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0} }, "null user"},
{{1, 1, {0, 0, 0, 0, 0, 1}, {0, 0, 0, 0, 0} }, "nobody"}, {{1, 1, {0, 0, 0, 0, 0, 1}, {0, 0, 0, 0, 0} }, "nobody"},
{{1, 1, {0, 0, 0, 0, 0, 5}, {cpu_to_le32(11), 0, 0, 0, 0} }, "net-users"}, {{1, 1, {0, 0, 0, 0, 0, 5}, {__constant_cpu_to_le32(11), 0, 0, 0, 0} }, "net-users"},
{{1, 1, {0, 0, 0, 0, 0, 5}, {cpu_to_le32(18), 0, 0, 0, 0} }, "sys"}, {{1, 1, {0, 0, 0, 0, 0, 5}, {__constant_cpu_to_le32(18), 0, 0, 0, 0} }, "sys"},
{{1, 2, {0, 0, 0, 0, 0, 5}, {cpu_to_le32(32), cpu_to_le32(544), 0, 0, 0} }, "root"}, {{1, 2, {0, 0, 0, 0, 0, 5}, {__constant_cpu_to_le32(32), __constant_cpu_to_le32(544), 0, 0, 0} }, "root"},
{{1, 2, {0, 0, 0, 0, 0, 5}, {cpu_to_le32(32), cpu_to_le32(545), 0, 0, 0} }, "users"}, {{1, 2, {0, 0, 0, 0, 0, 5}, {__constant_cpu_to_le32(32), __constant_cpu_to_le32(545), 0, 0, 0} }, "users"},
{{1, 2, {0, 0, 0, 0, 0, 5}, {cpu_to_le32(32), cpu_to_le32(546), 0, 0, 0} }, "guest"} } {{1, 2, {0, 0, 0, 0, 0, 5}, {__constant_cpu_to_le32(32), __constant_cpu_to_le32(546), 0, 0, 0} }, "guest"} }
; ;
......
...@@ -219,15 +219,15 @@ int cifs_get_inode_info_unix(struct inode **pinode, ...@@ -219,15 +219,15 @@ int cifs_get_inode_info_unix(struct inode **pinode,
rc = CIFSSMBUnixQPathInfo(xid, pTcon, full_path, &find_data, rc = CIFSSMBUnixQPathInfo(xid, pTcon, full_path, &find_data,
cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & cifs_sb->local_nls, cifs_sb->mnt_cifs_flags &
CIFS_MOUNT_MAP_SPECIAL_CHR); CIFS_MOUNT_MAP_SPECIAL_CHR);
if (rc) { if (rc == -EREMOTE && !is_dfs_referral) {
if (rc == -EREMOTE && !is_dfs_referral) { is_dfs_referral = true;
is_dfs_referral = true; cFYI(DBG2, ("DFS ref"));
cFYI(DBG2, ("DFS ref")); /* for DFS, server does not give us real inode data */
/* for DFS, server does not give us real inode data */ fill_fake_finddataunix(&find_data, sb);
fill_fake_finddataunix(&find_data, sb); rc = 0;
rc = 0; } else if (rc)
} goto cgiiu_exit;
}
num_of_bytes = le64_to_cpu(find_data.NumOfBytes); num_of_bytes = le64_to_cpu(find_data.NumOfBytes);
end_of_file = le64_to_cpu(find_data.EndOfFile); end_of_file = le64_to_cpu(find_data.EndOfFile);
...@@ -236,7 +236,7 @@ int cifs_get_inode_info_unix(struct inode **pinode, ...@@ -236,7 +236,7 @@ int cifs_get_inode_info_unix(struct inode **pinode,
*pinode = new_inode(sb); *pinode = new_inode(sb);
if (*pinode == NULL) { if (*pinode == NULL) {
rc = -ENOMEM; rc = -ENOMEM;
goto cgiiu_exit; goto cgiiu_exit;
} }
/* Is an i_ino of zero legal? */ /* Is an i_ino of zero legal? */
/* note ino incremented to unique num in new_inode */ /* note ino incremented to unique num in new_inode */
......
...@@ -87,7 +87,7 @@ do { \ ...@@ -87,7 +87,7 @@ do { \
} while(0) } while(0)
#define irqs_disabled() \ #define irqs_disabled() \
({unsigned long flags; local_save_flags(flags); flags; }) ({unsigned long flags; local_save_flags(flags); !!flags; })
#define local_irq_save(flags) \ #define local_irq_save(flags) \
do { \ do { \
......
...@@ -188,8 +188,8 @@ static inline void native_set_ldt(const void *addr, unsigned int entries) ...@@ -188,8 +188,8 @@ static inline void native_set_ldt(const void *addr, unsigned int entries)
unsigned cpu = smp_processor_id(); unsigned cpu = smp_processor_id();
ldt_desc ldt; ldt_desc ldt;
set_tssldt_descriptor(&ldt, (unsigned long)addr, set_tssldt_descriptor(&ldt, (unsigned long)addr, DESC_LDT,
DESC_LDT, entries * sizeof(ldt) - 1); entries * LDT_ENTRY_SIZE - 1);
write_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_LDT, write_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_LDT,
&ldt, DESC_LDT); &ldt, DESC_LDT);
asm volatile("lldt %w0"::"q" (GDT_ENTRY_LDT*8)); asm volatile("lldt %w0"::"q" (GDT_ENTRY_LDT*8));
......
...@@ -1882,7 +1882,7 @@ static void scan_for_empty_cpusets(const struct cpuset *root) ...@@ -1882,7 +1882,7 @@ static void scan_for_empty_cpusets(const struct cpuset *root)
* in order to minimize text size. * in order to minimize text size.
*/ */
static void common_cpu_mem_hotplug_unplug(void) static void common_cpu_mem_hotplug_unplug(int rebuild_sd)
{ {
cgroup_lock(); cgroup_lock();
...@@ -1894,7 +1894,8 @@ static void common_cpu_mem_hotplug_unplug(void) ...@@ -1894,7 +1894,8 @@ static void common_cpu_mem_hotplug_unplug(void)
* Scheduler destroys domains on hotplug events. * Scheduler destroys domains on hotplug events.
* Rebuild them based on the current settings. * Rebuild them based on the current settings.
*/ */
rebuild_sched_domains(); if (rebuild_sd)
rebuild_sched_domains();
cgroup_unlock(); cgroup_unlock();
} }
...@@ -1912,11 +1913,22 @@ static void common_cpu_mem_hotplug_unplug(void) ...@@ -1912,11 +1913,22 @@ static void common_cpu_mem_hotplug_unplug(void)
static int cpuset_handle_cpuhp(struct notifier_block *unused_nb, static int cpuset_handle_cpuhp(struct notifier_block *unused_nb,
unsigned long phase, void *unused_cpu) unsigned long phase, void *unused_cpu)
{ {
if (phase == CPU_DYING || phase == CPU_DYING_FROZEN) switch (phase) {
case CPU_UP_CANCELED:
case CPU_UP_CANCELED_FROZEN:
case CPU_DOWN_FAILED:
case CPU_DOWN_FAILED_FROZEN:
case CPU_ONLINE:
case CPU_ONLINE_FROZEN:
case CPU_DEAD:
case CPU_DEAD_FROZEN:
common_cpu_mem_hotplug_unplug(1);
break;
default:
return NOTIFY_DONE; return NOTIFY_DONE;
}
common_cpu_mem_hotplug_unplug(); return NOTIFY_OK;
return 0;
} }
#ifdef CONFIG_MEMORY_HOTPLUG #ifdef CONFIG_MEMORY_HOTPLUG
...@@ -1929,7 +1941,7 @@ static int cpuset_handle_cpuhp(struct notifier_block *unused_nb, ...@@ -1929,7 +1941,7 @@ static int cpuset_handle_cpuhp(struct notifier_block *unused_nb,
void cpuset_track_online_nodes(void) void cpuset_track_online_nodes(void)
{ {
common_cpu_mem_hotplug_unplug(); common_cpu_mem_hotplug_unplug(0);
} }
#endif #endif
......
...@@ -222,7 +222,7 @@ static void devcgroup_destroy(struct cgroup_subsys *ss, ...@@ -222,7 +222,7 @@ static void devcgroup_destroy(struct cgroup_subsys *ss,
#define DEVCG_DENY 2 #define DEVCG_DENY 2
#define DEVCG_LIST 3 #define DEVCG_LIST 3
#define MAJMINLEN 10 #define MAJMINLEN 13
#define ACCLEN 4 #define ACCLEN 4
static void set_access(char *acc, short access) static void set_access(char *acc, short access)
...@@ -254,7 +254,7 @@ static void set_majmin(char *str, unsigned m) ...@@ -254,7 +254,7 @@ static void set_majmin(char *str, unsigned m)
if (m == ~0) if (m == ~0)
sprintf(str, "*"); sprintf(str, "*");
else else
snprintf(str, MAJMINLEN, "%d", m); snprintf(str, MAJMINLEN, "%u", m);
} }
static int devcgroup_seq_read(struct cgroup *cgroup, struct cftype *cft, static int devcgroup_seq_read(struct cgroup *cgroup, struct cftype *cft,
...@@ -300,7 +300,7 @@ static int may_access_whitelist(struct dev_cgroup *c, ...@@ -300,7 +300,7 @@ static int may_access_whitelist(struct dev_cgroup *c,
continue; continue;
if (whitem->minor != ~0 && whitem->minor != refwh->minor) if (whitem->minor != ~0 && whitem->minor != refwh->minor)
continue; continue;
if (refwh->access & (~(whitem->access | ACC_MASK))) if (refwh->access & (~whitem->access))
continue; continue;
return 1; return 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment