Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5620
b: refs/heads/master
c: 9d34321
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Aug 4, 2005
1 parent b11c822 commit 346e90b
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 42 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: ff2afb9df607dfcaacdaf67ea84b773c6fb08f4c
refs/heads/master: 9d343219e33e8b49d754ea9b2e45f6c7da87f4fb
17 changes: 7 additions & 10 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 2:
case VM_FAULT_MAJOR:
tsk->maj_flt++;
return fault;
case 1:
case VM_FAULT_MINOR:
tsk->min_flt++;
case 0:
case VM_FAULT_SIGBUS:
return fault;
}

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

/*
* We had some memory, but were unable to
* successfully fix up this page fault.
*/
if (fault == 0){
case VM_FAULT_SIGBUS:
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 1:
case VM_FAULT_MINOR:
tsk->min_flt++;
break;
case 2:
case VM_FAULT_MAJOR:
tsk->maj_flt++;
break;
case 0:
case VM_FAULT_SIGBUS:
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 1:
case VM_FAULT_MINOR:
current->min_flt++;
break;
case 2:
case VM_FAULT_MAJOR:
current->maj_flt++;
break;
case 0:
case VM_FAULT_SIGBUS:
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 1:
case VM_FAULT_MINOR:
current->min_flt++;
break;
case 2:
case VM_FAULT_MAJOR:
current->maj_flt++;
break;
case 0:
case VM_FAULT_SIGBUS:
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 1:
case VM_FAULT_MINOR:
++current->min_flt;
break;
case 2:
case VM_FAULT_MAJOR:
++current->maj_flt;
break;
case 0:
case VM_FAULT_SIGBUS:
/*
* We ran out of memory, or some other thing happened
* to us that made us unable to handle the page fault
* gracefully.
* 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.
*/
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 1:
case VM_FAULT_MINOR:
tsk->min_flt++;
break;
case 2:
case VM_FAULT_MAJOR:
tsk->maj_flt++;
break;
case 0:
case VM_FAULT_SIGBUS:
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 1:
case VM_FAULT_MINOR:
tsk->min_flt++;
break;
case 2:
case VM_FAULT_MAJOR:
tsk->maj_flt++;
break;
case 0:
case VM_FAULT_SIGBUS:
goto do_sigbus;
default:
goto out_of_memory;
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/infiniband/include/ib_cm.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ 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_REDIRECT = __constant_htons(24),
IB_CM_REJ_PORT_CM_REDIRECT = __constant_htons(24),
IB_CM_REJ_PORT_REDIRECT = __constant_htons(25),
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: 3 additions & 2 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,9 +600,10 @@ 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 reply */
/* unicast GID -- should be ARP or RARP reply */

if (be16_to_cpup((u16 *) skb->data) != ETH_P_ARP) {
if ((be16_to_cpup((__be16 *) skb->data) != ETH_P_ARP) &&
(be16_to_cpup((__be16 *) skb->data) != ETH_P_RARP)) {
ipoib_warn(priv, "Unicast, no %s: type %04x, QPN %06x "
IPOIB_GID_FMT "\n",
skb->dst ? "neigh" : "dst",
Expand Down
2 changes: 0 additions & 2 deletions trunk/kernel/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,6 @@ 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 @@ -415,7 +414,6 @@ 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: 7 additions & 4 deletions trunk/security/keys/keyctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ 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 @@ -144,6 +141,10 @@ 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 @@ -362,7 +363,7 @@ long keyctl_revoke_key(key_serial_t id)

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

} /* end keyctl_revoke_key() */

Expand Down Expand Up @@ -685,6 +686,8 @@ 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 (!PTR_ERR(key))
if (!IS_ERR(key))
request_key_link(key, dest_keyring);
}

Expand Down

0 comments on commit 346e90b

Please sign in to comment.