Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5619
b: refs/heads/master
c: ff2afb9
h: refs/heads/master
i:
  5617: 562a693
  5615: 6896d9e
v: v3
  • Loading branch information
Russell King authored and Russell King committed Aug 4, 2005
1 parent 66d4955 commit b11c822
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 45 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: ea48e705be4f886c16313c882a6623b442bab0eb
refs/heads/master: ff2afb9df607dfcaacdaf67ea84b773c6fb08f4c
6 changes: 3 additions & 3 deletions trunk/arch/arm/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
up_read(&mm->mmap_sem);

/*
* Handle the "normal" case first
* Handle the "normal" case first - VM_FAULT_MAJOR / VM_FAULT_MINOR
*/
if (fault > 0)
if (fault >= VM_FAULT_MINOR)
return 0;

/*
Expand All @@ -261,7 +261,7 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
do_exit(SIGKILL);
return 0;

case 0:
case VM_FAULT_SIGBUS:
/*
* We had some memory, but were unable to
* successfully fix up this page fault.
Expand Down
17 changes: 10 additions & 7 deletions trunk/arch/arm26/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,12 @@ __do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr,
* Handle the "normal" cases first - successful and sigbus
*/
switch (fault) {
case VM_FAULT_MAJOR:
case 2:
tsk->maj_flt++;
return fault;
case VM_FAULT_MINOR:
case 1:
tsk->min_flt++;
case VM_FAULT_SIGBUS:
case 0:
return fault;
}

Expand Down Expand Up @@ -226,11 +226,14 @@ int do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
/*
* Handle the "normal" case first
*/
switch (fault) {
case VM_FAULT_MINOR:
case VM_FAULT_MAJOR:
if (fault > 0)
return 0;
case VM_FAULT_SIGBUS:

/*
* We had some memory, but were unable to
* successfully fix up this page fault.
*/
if (fault == 0){
goto do_sigbus;
}

Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/cris/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,13 @@ do_page_fault(unsigned long address, struct pt_regs *regs,
*/

switch (handle_mm_fault(mm, vma, address, writeaccess & 1)) {
case VM_FAULT_MINOR:
case 1:
tsk->min_flt++;
break;
case VM_FAULT_MAJOR:
case 2:
tsk->maj_flt++;
break;
case VM_FAULT_SIGBUS:
case 0:
goto do_sigbus;
default:
goto out_of_memory;
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/frv/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@ asmlinkage void do_page_fault(int datammu, unsigned long esr0, unsigned long ear
* the fault.
*/
switch (handle_mm_fault(mm, vma, ear0, write)) {
case VM_FAULT_MINOR:
case 1:
current->min_flt++;
break;
case VM_FAULT_MAJOR:
case 2:
current->maj_flt++;
break;
case VM_FAULT_SIGBUS:
case 0:
goto do_sigbus;
default:
goto out_of_memory;
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/m68k/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ int do_page_fault(struct pt_regs *regs, unsigned long address,
printk("handle_mm_fault returns %d\n",fault);
#endif
switch (fault) {
case VM_FAULT_MINOR:
case 1:
current->min_flt++;
break;
case VM_FAULT_MAJOR:
case 2:
current->maj_flt++;
break;
case VM_FAULT_SIGBUS:
case 0:
goto bus_err;
default:
goto out_of_memory;
Expand Down
12 changes: 6 additions & 6 deletions trunk/arch/parisc/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,17 +178,17 @@ void do_page_fault(struct pt_regs *regs, unsigned long code,
*/

switch (handle_mm_fault(mm, vma, address, (acc_type & VM_WRITE) != 0)) {
case VM_FAULT_MINOR:
case 1:
++current->min_flt;
break;
case VM_FAULT_MAJOR:
case 2:
++current->maj_flt;
break;
case VM_FAULT_SIGBUS:
case 0:
/*
* We hit a hared mapping outside of the file, or some
* other thing happened to us that made us unable to
* handle the page fault gracefully.
* We ran out of memory, or some other thing happened
* to us that made us unable to handle the page fault
* gracefully.
*/
goto bad_area;
default:
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/sh64/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,13 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
*/
survive:
switch (handle_mm_fault(mm, vma, address, writeaccess)) {
case VM_FAULT_MINOR:
case 1:
tsk->min_flt++;
break;
case VM_FAULT_MAJOR:
case 2:
tsk->maj_flt++;
break;
case VM_FAULT_SIGBUS:
case 0:
goto do_sigbus;
default:
goto out_of_memory;
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/x86_64/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,13 +439,13 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code)
* the fault.
*/
switch (handle_mm_fault(mm, vma, address, write)) {
case VM_FAULT_MINOR:
case 1:
tsk->min_flt++;
break;
case VM_FAULT_MAJOR:
case 2:
tsk->maj_flt++;
break;
case VM_FAULT_SIGBUS:
case 0:
goto do_sigbus;
default:
goto out_of_memory;
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/infiniband/include/ib_cm.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@ enum ib_cm_rej_reason {
IB_CM_REJ_INVALID_ALT_TRAFFIC_CLASS = __constant_htons(21),
IB_CM_REJ_INVALID_ALT_HOP_LIMIT = __constant_htons(22),
IB_CM_REJ_INVALID_ALT_PACKET_RATE = __constant_htons(23),
IB_CM_REJ_PORT_CM_REDIRECT = __constant_htons(24),
IB_CM_REJ_PORT_REDIRECT = __constant_htons(25),
IB_CM_REJ_PORT_REDIRECT = __constant_htons(24),
IB_CM_REJ_INVALID_MTU = __constant_htons(26),
IB_CM_REJ_INSUFFICIENT_RESP_RESOURCES = __constant_htons(27),
IB_CM_REJ_CONSUMER_DEFINED = __constant_htons(28),
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,10 +600,9 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev)

ipoib_mcast_send(dev, (union ib_gid *) (phdr->hwaddr + 4), skb);
} else {
/* unicast GID -- should be ARP or RARP reply */
/* unicast GID -- should be ARP reply */

if ((be16_to_cpup((__be16 *) skb->data) != ETH_P_ARP) &&
(be16_to_cpup((__be16 *) skb->data) != ETH_P_RARP)) {
if (be16_to_cpup((u16 *) skb->data) != ETH_P_ARP) {
ipoib_warn(priv, "Unicast, no %s: type %04x, QPN %06x "
IPOIB_GID_FMT "\n",
skb->dst ? "neigh" : "dst",
Expand Down
2 changes: 2 additions & 0 deletions trunk/kernel/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ void kernel_halt(void)
{
notifier_call_chain(&reboot_notifier_list, SYS_HALT, NULL);
system_state = SYSTEM_HALT;
device_suspend(PMSG_SUSPEND);
device_shutdown();
printk(KERN_EMERG "System halted.\n");
machine_halt();
Expand All @@ -414,6 +415,7 @@ void kernel_power_off(void)
{
notifier_call_chain(&reboot_notifier_list, SYS_POWER_OFF, NULL);
system_state = SYSTEM_POWER_OFF;
device_suspend(PMSG_SUSPEND);
device_shutdown();
printk(KERN_EMERG "Power down.\n");
machine_power_off();
Expand Down
11 changes: 4 additions & 7 deletions trunk/security/keys/keyctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ asmlinkage long sys_add_key(const char __user *_type,
goto error;
type[31] = '\0';

if (!type[0])
goto error;

ret = -EPERM;
if (type[0] == '.')
goto error;
Expand Down Expand Up @@ -141,10 +144,6 @@ asmlinkage long sys_request_key(const char __user *_type,
goto error;
type[31] = '\0';

ret = -EPERM;
if (type[0] == '.')
goto error;

/* pull the description into kernel space */
ret = -EFAULT;
dlen = strnlen_user(_description, PAGE_SIZE - 1);
Expand Down Expand Up @@ -363,7 +362,7 @@ long keyctl_revoke_key(key_serial_t id)

key_put(key);
error:
return ret;
return 0;

} /* end keyctl_revoke_key() */

Expand Down Expand Up @@ -686,8 +685,6 @@ long keyctl_read_key(key_serial_t keyid, char __user *buffer, size_t buflen)
goto can_read_key2;

ret = PTR_ERR(skey);
if (ret == -EAGAIN)
ret = -EACCES;
goto error2;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/security/keys/request_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ struct key *request_key_and_link(struct key_type *type,
key_user_put(user);

/* link the new key into the appropriate keyring */
if (!IS_ERR(key))
if (!PTR_ERR(key))
request_key_link(key, dest_keyring);
}

Expand Down

0 comments on commit b11c822

Please sign in to comment.