aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-14 05:37:46 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-14 05:37:46 -0400
commitd59fdcf2ac501de99c3dfb452af5e254d4342886 (patch)
treead5e2efd6f8aacf2a08b1ed8a54ddf96642e83f3 /drivers
parent2387ce57a8167490d3b34a7e1ffa9a64a1a76244 (diff)
parentbce7f793daec3e65ec5c5705d2457b81fe7b5725 (diff)
Merge commit 'v2.6.26' into x86/core
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/pcmcia/ipwireless/hardware.c4
-rw-r--r--drivers/isdn/i4l/isdn_common.c4
-rw-r--r--drivers/media/video/ov7670.c4
-rw-r--r--drivers/message/fusion/mptbase.c11
-rw-r--r--drivers/message/fusion/mptspi.c9
-rw-r--r--drivers/rtc/rtc-fm3130.c2
-rw-r--r--drivers/rtc/rtc-pcf8563.c1
-rw-r--r--drivers/scsi/ipr.c6
-rw-r--r--drivers/scsi/scsi_lib.c9
-rw-r--r--drivers/serial/8250.c3
-rw-r--r--drivers/video/fb_defio.c20
11 files changed, 62 insertions, 11 deletions
diff --git a/drivers/char/pcmcia/ipwireless/hardware.c b/drivers/char/pcmcia/ipwireless/hardware.c
index ba6340ae98af..929101ecbae2 100644
--- a/drivers/char/pcmcia/ipwireless/hardware.c
+++ b/drivers/char/pcmcia/ipwireless/hardware.c
@@ -590,8 +590,10 @@ static struct ipw_rx_packet *pool_allocate(struct ipw_hardware *hw,
590 packet = kmalloc(sizeof(struct ipw_rx_packet) + 590 packet = kmalloc(sizeof(struct ipw_rx_packet) +
591 old_packet->length + minimum_free_space, 591 old_packet->length + minimum_free_space,
592 GFP_ATOMIC); 592 GFP_ATOMIC);
593 if (!packet) 593 if (!packet) {
594 kfree(old_packet);
594 return NULL; 595 return NULL;
596 }
595 memcpy(packet, old_packet, 597 memcpy(packet, old_packet,
596 sizeof(struct ipw_rx_packet) 598 sizeof(struct ipw_rx_packet)
597 + old_packet->length); 599 + old_packet->length);
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c
index 0f3c66de69bc..8d8c6b736167 100644
--- a/drivers/isdn/i4l/isdn_common.c
+++ b/drivers/isdn/i4l/isdn_common.c
@@ -1977,8 +1977,10 @@ isdn_writebuf_stub(int drvidx, int chan, const u_char __user * buf, int len)
1977 if (!skb) 1977 if (!skb)
1978 return -ENOMEM; 1978 return -ENOMEM;
1979 skb_reserve(skb, hl); 1979 skb_reserve(skb, hl);
1980 if (copy_from_user(skb_put(skb, len), buf, len)) 1980 if (copy_from_user(skb_put(skb, len), buf, len)) {
1981 dev_kfree_skb(skb);
1981 return -EFAULT; 1982 return -EFAULT;
1983 }
1982 ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, 1, skb); 1984 ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, 1, skb);
1983 if (ret <= 0) 1985 if (ret <= 0)
1984 dev_kfree_skb(skb); 1986 dev_kfree_skb(skb);
diff --git a/drivers/media/video/ov7670.c b/drivers/media/video/ov7670.c
index 2bc6bdc9c1f2..d7bfd30f74a9 100644
--- a/drivers/media/video/ov7670.c
+++ b/drivers/media/video/ov7670.c
@@ -406,8 +406,10 @@ static int ov7670_read(struct i2c_client *c, unsigned char reg,
406 int ret; 406 int ret;
407 407
408 ret = i2c_smbus_read_byte_data(c, reg); 408 ret = i2c_smbus_read_byte_data(c, reg);
409 if (ret >= 0) 409 if (ret >= 0) {
410 *value = (unsigned char) ret; 410 *value = (unsigned char) ret;
411 ret = 0;
412 }
411 return ret; 413 return ret;
412} 414}
413 415
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index db3c892f87fb..d40d6d15ae20 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -1686,9 +1686,14 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
1686 ioc->bus_type = SAS; 1686 ioc->bus_type = SAS;
1687 } 1687 }
1688 1688
1689 if (ioc->bus_type == SAS && mpt_msi_enable == -1) 1689 if (mpt_msi_enable == -1) {
1690 ioc->msi_enable = 1; 1690 /* Enable on SAS, disable on FC and SPI */
1691 else 1691 if (ioc->bus_type == SAS)
1692 ioc->msi_enable = 1;
1693 else
1694 ioc->msi_enable = 0;
1695 } else
1696 /* follow flag: 0 - disable; 1 - enable */
1692 ioc->msi_enable = mpt_msi_enable; 1697 ioc->msi_enable = mpt_msi_enable;
1693 1698
1694 if (ioc->errata_flag_1064) 1699 if (ioc->errata_flag_1064)
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c
index 25bcfcf36f2e..1effca4e40e1 100644
--- a/drivers/message/fusion/mptspi.c
+++ b/drivers/message/fusion/mptspi.c
@@ -1266,13 +1266,18 @@ mptspi_dv_renegotiate(struct _MPT_SCSI_HOST *hd)
1266static int 1266static int
1267mptspi_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) 1267mptspi_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
1268{ 1268{
1269 struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh);
1270 int rc; 1269 int rc;
1271 1270
1272 rc = mptscsih_ioc_reset(ioc, reset_phase); 1271 rc = mptscsih_ioc_reset(ioc, reset_phase);
1273 1272
1274 if (reset_phase == MPT_IOC_POST_RESET) 1273 /* only try to do a renegotiation if we're properly set up
1274 * if we get an ioc fault on bringup, ioc->sh will be NULL */
1275 if (reset_phase == MPT_IOC_POST_RESET &&
1276 ioc->sh) {
1277 struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh);
1278
1275 mptspi_dv_renegotiate(hd); 1279 mptspi_dv_renegotiate(hd);
1280 }
1276 1281
1277 return rc; 1282 return rc;
1278} 1283}
diff --git a/drivers/rtc/rtc-fm3130.c b/drivers/rtc/rtc-fm3130.c
index 11644c8fca82..abfdfcbaa059 100644
--- a/drivers/rtc/rtc-fm3130.c
+++ b/drivers/rtc/rtc-fm3130.c
@@ -55,7 +55,7 @@ struct fm3130 {
55 int alarm; 55 int alarm;
56}; 56};
57static const struct i2c_device_id fm3130_id[] = { 57static const struct i2c_device_id fm3130_id[] = {
58 { "fm3130-rtc", 0 }, 58 { "fm3130", 0 },
59 { } 59 { }
60}; 60};
61MODULE_DEVICE_TABLE(i2c, fm3130_id); 61MODULE_DEVICE_TABLE(i2c, fm3130_id);
diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c
index 0fc4c3630780..748a502a6355 100644
--- a/drivers/rtc/rtc-pcf8563.c
+++ b/drivers/rtc/rtc-pcf8563.c
@@ -302,6 +302,7 @@ static int pcf8563_remove(struct i2c_client *client)
302 302
303static const struct i2c_device_id pcf8563_id[] = { 303static const struct i2c_device_id pcf8563_id[] = {
304 { "pcf8563", 0 }, 304 { "pcf8563", 0 },
305 { "rtc8564", 0 },
305 { } 306 { }
306}; 307};
307MODULE_DEVICE_TABLE(i2c, pcf8563_id); 308MODULE_DEVICE_TABLE(i2c, pcf8563_id);
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 999e91ea7451..e7a3a6554425 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -71,6 +71,7 @@
71#include <linux/module.h> 71#include <linux/module.h>
72#include <linux/moduleparam.h> 72#include <linux/moduleparam.h>
73#include <linux/libata.h> 73#include <linux/libata.h>
74#include <linux/hdreg.h>
74#include <asm/io.h> 75#include <asm/io.h>
75#include <asm/irq.h> 76#include <asm/irq.h>
76#include <asm/processor.h> 77#include <asm/processor.h>
@@ -4913,8 +4914,11 @@ static int ipr_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)
4913 struct ipr_resource_entry *res; 4914 struct ipr_resource_entry *res;
4914 4915
4915 res = (struct ipr_resource_entry *)sdev->hostdata; 4916 res = (struct ipr_resource_entry *)sdev->hostdata;
4916 if (res && ipr_is_gata(res)) 4917 if (res && ipr_is_gata(res)) {
4918 if (cmd == HDIO_GET_IDENTITY)
4919 return -ENOTTY;
4917 return ata_scsi_ioctl(sdev, cmd, arg); 4920 return ata_scsi_ioctl(sdev, cmd, arg);
4921 }
4918 4922
4919 return -EINVAL; 4923 return -EINVAL;
4920} 4924}
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index a82d2fe80fb5..cbf55d59a54c 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -207,6 +207,15 @@ int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd,
207 */ 207 */
208 blk_execute_rq(req->q, NULL, req, 1); 208 blk_execute_rq(req->q, NULL, req, 1);
209 209
210 /*
211 * Some devices (USB mass-storage in particular) may transfer
212 * garbage data together with a residue indicating that the data
213 * is invalid. Prevent the garbage from being misinterpreted
214 * and prevent security leaks by zeroing out the excess data.
215 */
216 if (unlikely(req->data_len > 0 && req->data_len <= bufflen))
217 memset(buffer + (bufflen - req->data_len), 0, req->data_len);
218
210 ret = req->errors; 219 ret = req->errors;
211 out: 220 out:
212 blk_put_request(req); 221 blk_put_request(req);
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 1bc00b721e9d..be95e55b228b 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2623,6 +2623,9 @@ static struct console serial8250_console = {
2623 2623
2624static int __init serial8250_console_init(void) 2624static int __init serial8250_console_init(void)
2625{ 2625{
2626 if (nr_uarts > UART_NR)
2627 nr_uarts = UART_NR;
2628
2626 serial8250_isa_init_ports(); 2629 serial8250_isa_init_ports();
2627 register_console(&serial8250_console); 2630 register_console(&serial8250_console);
2628 return 0; 2631 return 0;
diff --git a/drivers/video/fb_defio.c b/drivers/video/fb_defio.c
index 24843fdd5395..59df132cc375 100644
--- a/drivers/video/fb_defio.c
+++ b/drivers/video/fb_defio.c
@@ -74,6 +74,7 @@ static int fb_deferred_io_mkwrite(struct vm_area_struct *vma,
74{ 74{
75 struct fb_info *info = vma->vm_private_data; 75 struct fb_info *info = vma->vm_private_data;
76 struct fb_deferred_io *fbdefio = info->fbdefio; 76 struct fb_deferred_io *fbdefio = info->fbdefio;
77 struct page *cur;
77 78
78 /* this is a callback we get when userspace first tries to 79 /* this is a callback we get when userspace first tries to
79 write to the page. we schedule a workqueue. that workqueue 80 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 84
84 /* protect against the workqueue changing the page list */ 85 /* protect against the workqueue changing the page list */
85 mutex_lock(&fbdefio->lock); 86 mutex_lock(&fbdefio->lock);
86 list_add(&page->lru, &fbdefio->pagelist); 87
88 /* we loop through the pagelist before adding in order
89 to keep the pagelist sorted */
90 list_for_each_entry(cur, &fbdefio->pagelist, lru) {
91 /* this check is to catch the case where a new
92 process could start writing to the same page
93 through a new pte. this new access can cause the
94 mkwrite even when the original ps's pte is marked
95 writable */
96 if (unlikely(cur == page))
97 goto page_already_added;
98 else if (cur->index > page->index)
99 break;
100 }
101
102 list_add_tail(&page->lru, &cur->lru);
103
104page_already_added:
87 mutex_unlock(&fbdefio->lock); 105 mutex_unlock(&fbdefio->lock);
88 106
89 /* come back after delay to process the deferred IO */ 107 /* come back after delay to process the deferred IO */