Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72887
b: refs/heads/master
c: fb7267a
h: refs/heads/master
i:
  72885: 45baa2f
  72883: 7a9ad90
  72879: 379c144
v: v3
  • Loading branch information
Linus Torvalds committed Oct 30, 2007
1 parent 5893df8 commit a2585b1
Show file tree
Hide file tree
Showing 29 changed files with 158 additions and 98 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2ea4649b3634b9dbd098d0d8be65304eb2ea3a9c
refs/heads/master: fb7267acfef1de3e49d4e0c80be3cc603e974b3b
1 change: 0 additions & 1 deletion trunk/arch/x86/Kconfig.x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,6 @@ config PCI_DOMAINS
config DMAR
bool "Support for DMA Remapping Devices (EXPERIMENTAL)"
depends on PCI_MSI && ACPI && EXPERIMENTAL
default y
help
DMA remapping (DMAR) devices support enables independent address
translations for Direct Memory Access (DMA) from devices.
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/dma/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ comment "DMA Clients"
config NET_DMA
bool "Network: TCP receive copy offload"
depends on DMA_ENGINE && NET
default y
help
This enables the use of DMA engines in the network stack to
offload receive copy-to-user operations, freeing CPU cycles.
Expand Down
55 changes: 34 additions & 21 deletions trunk/drivers/net/wan/lmc/lmc_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,10 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
* To date internally, just copy this out to the user.
*/
case LMCIOCGINFO: /*fold01*/
if (copy_to_user(ifr->ifr_data, &sc->ictl, sizeof (lmc_ctl_t)))
return -EFAULT;
ret = 0;
if (copy_to_user(ifr->ifr_data, &sc->ictl, sizeof(lmc_ctl_t)))
ret = -EFAULT;
else
ret = 0;
break;

case LMCIOCSINFO: /*fold01*/
Expand All @@ -159,8 +160,10 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
break;
}

if (copy_from_user(&ctl, ifr->ifr_data, sizeof (lmc_ctl_t)))
return -EFAULT;
if (copy_from_user(&ctl, ifr->ifr_data, sizeof(lmc_ctl_t))) {
ret = -EFAULT;
break;
}

sc->lmc_media->set_status (sc, &ctl);

Expand Down Expand Up @@ -190,8 +193,10 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
break;
}

if (copy_from_user(&new_type, ifr->ifr_data, sizeof(u_int16_t)))
return -EFAULT;
if (copy_from_user(&new_type, ifr->ifr_data, sizeof(u_int16_t))) {
ret = -EFAULT;
break;
}


if (new_type == old_type)
Expand Down Expand Up @@ -229,9 +234,10 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
sc->lmc_xinfo.Magic1 = 0xDEADBEEF;

if (copy_to_user(ifr->ifr_data, &sc->lmc_xinfo,
sizeof (struct lmc_xinfo)))
return -EFAULT;
ret = 0;
sizeof(struct lmc_xinfo))) {
ret = -EFAULT;
else
ret = 0;

break;

Expand Down Expand Up @@ -262,9 +268,9 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/

if (copy_to_user(ifr->ifr_data, &sc->stats,
sizeof (struct lmc_statistics)))
return -EFAULT;

ret = 0;
ret = -EFAULT;
else
ret = 0;
break;

case LMCIOCCLEARLMCSTATS: /*fold01*/
Expand Down Expand Up @@ -292,8 +298,10 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
break;
}

if (copy_from_user(&ctl, ifr->ifr_data, sizeof (lmc_ctl_t)))
return -EFAULT;
if (copy_from_user(&ctl, ifr->ifr_data, sizeof(lmc_ctl_t))) {
ret = -EFAULT;
break;
}
sc->lmc_media->set_circuit_type(sc, ctl.circuit_type);
sc->ictl.circuit_type = ctl.circuit_type;
ret = 0;
Expand All @@ -318,12 +326,15 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/

#ifdef DEBUG
case LMCIOCDUMPEVENTLOG:
if (copy_to_user(ifr->ifr_data, &lmcEventLogIndex, sizeof (u32)))
return -EFAULT;
if (copy_to_user(ifr->ifr_data, &lmcEventLogIndex, sizeof(u32))) {
ret = -EFAULT;
break;
}
if (copy_to_user(ifr->ifr_data + sizeof (u32), lmcEventLogBuf, sizeof (lmcEventLogBuf)))
return -EFAULT;
ret = -EFAULT;
else
ret = 0;

ret = 0;
break;
#endif /* end ifdef _DBG_EVENTLOG */
case LMCIOCT1CONTROL: /*fold01*/
Expand All @@ -346,8 +357,10 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
*/
netif_stop_queue(dev);

if (copy_from_user(&xc, ifr->ifr_data, sizeof (struct lmc_xilinx_control)))
return -EFAULT;
if (copy_from_user(&xc, ifr->ifr_data, sizeof(struct lmc_xilinx_control))) {
ret = -EFAULT;
break;
}
switch(xc.command){
case lmc_xilinx_reset: /*fold02*/
{
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/pci/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -749,8 +749,8 @@ static char *fault_reason_strings[] =

char *dmar_get_fault_reason(u8 fault_reason)
{
if (fault_reason > MAX_FAULT_REASON_IDX)
return fault_reason_strings[MAX_FAULT_REASON_IDX];
if (fault_reason >= MAX_FAULT_REASON_IDX)
return fault_reason_strings[MAX_FAULT_REASON_IDX - 1];
else
return fault_reason_strings[fault_reason];
}
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/rtc/rtc-s3c.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,8 +542,6 @@ static int s3c_rtc_probe(struct platform_device *pdev)

/* RTC Power management control */

static struct timespec s3c_rtc_delta;

static int ticnt_save;

static int s3c_rtc_suspend(struct platform_device *pdev, pm_message_t state)
Expand Down
10 changes: 9 additions & 1 deletion trunk/drivers/serial/serial_txx9.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,15 @@ static void
serial_txx9_pm(struct uart_port *port, unsigned int state,
unsigned int oldstate)
{
if (state == 0)
/*
* If oldstate was -1 this is called from
* uart_configure_port(). In this case do not initialize the
* port now, because the port was already initialized (for
* non-console port) or should not be initialized here (for
* console port). If we initialized the port here we lose
* serial console settings.
*/
if (state == 0 && oldstate != -1)
serial_txx9_initialize(port);
}

Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/video/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1892,9 +1892,7 @@ config FB_VIRTUAL

If unsure, say N.

if ARCH_OMAP
source "drivers/video/omap/Kconfig"
endif
source "drivers/video/omap/Kconfig"

source "drivers/video/backlight/Kconfig"
source "drivers/video/display/Kconfig"
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/video/aty/radeon_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

#include "ati_ids.h"

static void radeon_reinitialize_M10(struct radeonfb_info *rinfo);

/*
* Workarounds for bugs in PC laptops:
* - enable D2 sleep in some IBM Thinkpads
Expand All @@ -39,6 +37,8 @@ static void radeon_reinitialize_M10(struct radeonfb_info *rinfo);
*/

#if defined(CONFIG_PM) && defined(CONFIG_X86)
static void radeon_reinitialize_M10(struct radeonfb_info *rinfo);

struct radeon_device_id {
const char *ident; /* (arbitrary) Name */
const unsigned short subsystem_vendor; /* Subsystem Vendor ID */
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/video/omap/Kconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
config FB_OMAP
tristate "OMAP frame buffer support (EXPERIMENTAL)"
depends on FB
depends on FB && ARCH_OMAP
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
Expand Down
15 changes: 7 additions & 8 deletions trunk/fs/ufs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -933,20 +933,19 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
goto again;
}

/* Set sbi->s_flags here, used by ufs_get_fs_state() below */
sbi->s_flags = flags;
sbi->s_flags = flags;/*after that line some functions use s_flags*/
ufs_print_super_stuff(sb, usb1, usb2, usb3);

/*
* Check, if file system was correctly unmounted.
* If not, make it read only.
*/
if ((((flags & UFS_ST_MASK) == UFS_ST_44BSD) ||
((flags & UFS_ST_MASK) == UFS_ST_OLD) ||
((flags & UFS_ST_MASK) == UFS_ST_SUN) ||
((flags & UFS_ST_MASK) == UFS_ST_SUNOS) ||
((flags & UFS_ST_MASK) == UFS_ST_SUNx86)) &&
(ufs_get_fs_state(sb, usb1, usb3) == (UFS_FSOK - fs32_to_cpu(sb, usb1->fs_time)))) {
if (((flags & UFS_ST_MASK) == UFS_ST_44BSD) ||
((flags & UFS_ST_MASK) == UFS_ST_OLD) ||
(((flags & UFS_ST_MASK) == UFS_ST_SUN ||
(flags & UFS_ST_MASK) == UFS_ST_SUNOS ||
(flags & UFS_ST_MASK) == UFS_ST_SUNx86) &&
(ufs_get_fs_state(sb, usb1, usb3) == (UFS_FSOK - fs32_to_cpu(sb, usb1->fs_time))))) {
switch(usb1->fs_clean) {
case UFS_FSCLEAN:
UFSD("fs is clean\n");
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ header-y += ticable.h
header-y += times.h
header-y += tiocl.h
header-y += tipc.h
header-y += tipc_config.h
header-y += toshiba.h
header-y += ultrasound.h
header-y += un.h
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/ipmi_smi.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ static inline int ipmi_demangle_device_id(const unsigned char *data,
id->firmware_revision_2 = data[3];
id->ipmi_version = data[4];
id->additional_device_support = data[5];
if (data_len >= 6) {
if (data_len >= 11) {
id->manufacturer_id = (data[6] | (data[7] << 8) |
(data[8] << 16));
id->product_id = data[9] | (data[10] << 8);
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void recalc_sigpending_and_wake(struct task_struct *t)

void recalc_sigpending(void)
{
if (!recalc_sigpending_tsk(current))
if (!recalc_sigpending_tsk(current) && !freezing(current))
clear_thread_flag(TIF_SIGPENDING);

}
Expand Down
15 changes: 15 additions & 0 deletions trunk/mm/shmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,21 @@ static int shmem_writepage(struct page *page, struct writeback_control *wbc)
struct inode *inode;

BUG_ON(!PageLocked(page));
/*
* shmem_backing_dev_info's capabilities prevent regular writeback or
* sync from ever calling shmem_writepage; but a stacking filesystem
* may use the ->writepage of its underlying filesystem, in which case
* we want to do nothing when that underlying filesystem is tmpfs
* (writing out to swap is useful as a response to memory pressure, but
* of no use to stabilize the data) - just redirty the page, unlock it
* and claim success in this case. AOP_WRITEPAGE_ACTIVATE, and the
* page_mapped check below, must be avoided unless we're in reclaim.
*/
if (!wbc->for_reclaim) {
set_page_dirty(page);
unlock_page(page);
return 0;
}
BUG_ON(page_mapped(page));

mapping = page->mapping;
Expand Down
1 change: 1 addition & 0 deletions trunk/mm/sparse-vmemmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/vmalloc.h>
#include <linux/sched.h>
#include <asm/dma.h>
#include <asm/pgalloc.h>
#include <asm/pgtable.h>
Expand Down
10 changes: 9 additions & 1 deletion trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2172,7 +2172,15 @@ static void net_rx_action(struct softirq_action *h)

weight = n->weight;

work = n->poll(n, weight);
/* This NAPI_STATE_SCHED test is for avoiding a race
* with netpoll's poll_napi(). Only the entity which
* obtains the lock and sees NAPI_STATE_SCHED set will
* actually make the ->poll() call. Therefore we avoid
* accidently calling ->poll() when NAPI is not scheduled.
*/
work = 0;
if (test_bit(NAPI_STATE_SCHED, &n->state))
work = n->poll(n, weight);

WARN_ON_ONCE(work > weight);

Expand Down
37 changes: 28 additions & 9 deletions trunk/net/core/netpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,24 +116,43 @@ static __sum16 checksum_udp(struct sk_buff *skb, struct udphdr *uh,
* network adapter, forcing superfluous retries and possibly timeouts.
* Thus, we set our budget to greater than 1.
*/
static int poll_one_napi(struct netpoll_info *npinfo,
struct napi_struct *napi, int budget)
{
int work;

/* net_rx_action's ->poll() invocations and our's are
* synchronized by this test which is only made while
* holding the napi->poll_lock.
*/
if (!test_bit(NAPI_STATE_SCHED, &napi->state))
return budget;

npinfo->rx_flags |= NETPOLL_RX_DROP;
atomic_inc(&trapped);

work = napi->poll(napi, budget);

atomic_dec(&trapped);
npinfo->rx_flags &= ~NETPOLL_RX_DROP;

return budget - work;
}

static void poll_napi(struct netpoll *np)
{
struct netpoll_info *npinfo = np->dev->npinfo;
struct napi_struct *napi;
int budget = 16;

list_for_each_entry(napi, &np->dev->napi_list, dev_list) {
if (test_bit(NAPI_STATE_SCHED, &napi->state) &&
napi->poll_owner != smp_processor_id() &&
if (napi->poll_owner != smp_processor_id() &&
spin_trylock(&napi->poll_lock)) {
npinfo->rx_flags |= NETPOLL_RX_DROP;
atomic_inc(&trapped);

napi->poll(napi, budget);

atomic_dec(&trapped);
npinfo->rx_flags &= ~NETPOLL_RX_DROP;
budget = poll_one_napi(npinfo, napi, budget);
spin_unlock(&napi->poll_lock);

if (!budget)
break;
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions trunk/net/ipv4/ipvs/ip_vs_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ struct ip_vs_sync_thread_data {
int state;
};

#define IP_VS_SYNC_CONN_TIMEOUT (3*60*HZ)
#define SIMPLE_CONN_SIZE (sizeof(struct ip_vs_sync_conn))
#define FULL_CONN_SIZE \
(sizeof(struct ip_vs_sync_conn) + sizeof(struct ip_vs_sync_conn_options))
Expand Down Expand Up @@ -284,6 +283,7 @@ static void ip_vs_process_message(const char *buffer, const size_t buflen)
struct ip_vs_sync_conn *s;
struct ip_vs_sync_conn_options *opt;
struct ip_vs_conn *cp;
struct ip_vs_protocol *pp;
char *p;
int i;

Expand Down Expand Up @@ -342,7 +342,8 @@ static void ip_vs_process_message(const char *buffer, const size_t buflen)
p += SIMPLE_CONN_SIZE;

atomic_set(&cp->in_pkts, sysctl_ip_vs_sync_threshold[0]);
cp->timeout = IP_VS_SYNC_CONN_TIMEOUT;
pp = ip_vs_proto_get(s->protocol);
cp->timeout = pp->timeout_table[cp->state];
ip_vs_conn_put(cp);

if (p > buffer+buflen) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ static void icmp_put(struct seq_file *seq)
for (i=0; icmpmibmap[i].name != NULL; i++)
seq_printf(seq, " %lu",
snmp_fold_field((void **) icmpmsg_statistics,
icmpmibmap[i].index));
icmpmibmap[i].index | 0x100));
}

/*
Expand Down
Loading

0 comments on commit a2585b1

Please sign in to comment.