Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180635
b: refs/heads/master
c: ab320af
h: refs/heads/master
i:
  180633: 3aa0f7e
  180631: ed333f5
v: v3
  • Loading branch information
Linus Torvalds committed Feb 18, 2010
1 parent 4922bb2 commit e8232bd
Show file tree
Hide file tree
Showing 73 changed files with 363 additions and 196 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: d1d47ec6e62ab08d2ebb925fd9203abfad3adfbf
refs/heads/master: ab320af2244462703455dac59fe5ceede24d3662
4 changes: 3 additions & 1 deletion trunk/arch/ia64/include/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ extern void ia64_elf_core_copy_regs (struct pt_regs *src, elf_gregset_t dst);
relevant until we have real hardware to play with... */
#define ELF_PLATFORM NULL

#define SET_PERSONALITY(ex) set_personality(PER_LINUX)
#define SET_PERSONALITY(ex) \
set_personality((current->personality & ~PER_MASK) | PER_LINUX)

#define elf_read_implies_exec(ex, executable_stack) \
((executable_stack!=EXSTACK_DISABLE_X) && ((ex).e_flags & EF_IA_64_LINUX_EXECUTABLE_STACK) != 0)

Expand Down
11 changes: 9 additions & 2 deletions trunk/arch/sh/kernel/ptrace_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,17 @@ void user_enable_single_step(struct task_struct *child)
struct pt_regs *regs = child->thread.uregs;

regs->sr |= SR_SSTEP; /* auto-resetting upon exception */

set_tsk_thread_flag(child, TIF_SINGLESTEP);
}

void user_disable_single_step(struct task_struct *child)
{
struct pt_regs *regs = child->thread.uregs;

regs->sr &= ~SR_SSTEP;

clear_tsk_thread_flag(child, TIF_SINGLESTEP);
}

static int genregs_get(struct task_struct *target,
Expand Down Expand Up @@ -454,15 +458,18 @@ asmlinkage long long do_syscall_trace_enter(struct pt_regs *regs)

asmlinkage void do_syscall_trace_leave(struct pt_regs *regs)
{
int step;

if (unlikely(current->audit_context))
audit_syscall_exit(AUDITSC_RESULT(regs->regs[9]),
regs->regs[9]);

if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
trace_sys_exit(regs, regs->regs[9]);

if (test_thread_flag(TIF_SYSCALL_TRACE))
tracehook_report_syscall_exit(regs, 0);
step = test_thread_flag(TIF_SINGLESTEP);
if (step || test_thread_flag(TIF_SYSCALL_TRACE))
tracehook_report_syscall_exit(regs, step);
}

/* Called with interrupts disabled */
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/sh/kernel/signal_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ static int do_signal(struct pt_regs *regs, sigset_t *oldset)
* clear the TS_RESTORE_SIGMASK flag.
*/
current_thread_info()->status &= ~TS_RESTORE_SIGMASK;
tracehook_signal_handler(signr, &info, &ka, regs, 0);

tracehook_signal_handler(signr, &info, &ka, regs,
test_thread_flag(TIF_SINGLESTEP));
return 1;
}
}
Expand Down
5 changes: 1 addition & 4 deletions trunk/arch/x86/include/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,7 @@ static inline void elf_common_init(struct thread_struct *t,
}

#define ELF_PLAT_INIT(_r, load_addr) \
do { \
elf_common_init(&current->thread, _r, 0); \
clear_thread_flag(TIF_IA32); \
} while (0)
elf_common_init(&current->thread, _r, 0)

#define COMPAT_ELF_PLAT_INIT(regs, load_addr) \
elf_common_init(&current->thread, regs, __USER_DS)
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/x86/kernel/process_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,7 @@ void set_personality_ia32(void)

/* Make sure to be in 32bit mode */
set_thread_flag(TIF_IA32);
current->personality |= force_personality32;

/* Prepare the first "return" to user space */
current_thread_info()->status |= TS_COMPAT;
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/base/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ static void class_release(struct kobject *kobj)
else
pr_debug("class '%s' does not have a release() function, "
"be careful\n", class->name);

kfree(cp);
}

static struct sysfs_ops class_sysfs_ops = {
Expand Down
53 changes: 39 additions & 14 deletions trunk/drivers/firewire/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -893,20 +893,31 @@ static void fwnet_receive_broadcast(struct fw_iso_context *context,

static struct kmem_cache *fwnet_packet_task_cache;

static void fwnet_free_ptask(struct fwnet_packet_task *ptask)
{
dev_kfree_skb_any(ptask->skb);
kmem_cache_free(fwnet_packet_task_cache, ptask);
}

static int fwnet_send_packet(struct fwnet_packet_task *ptask);

static void fwnet_transmit_packet_done(struct fwnet_packet_task *ptask)
{
struct fwnet_device *dev;
struct fwnet_device *dev = ptask->dev;
unsigned long flags;

dev = ptask->dev;
bool free;

spin_lock_irqsave(&dev->lock, flags);
list_del(&ptask->pt_link);
spin_unlock_irqrestore(&dev->lock, flags);

ptask->outstanding_pkts--; /* FIXME access inside lock */
ptask->outstanding_pkts--;

/* Check whether we or the networking TX soft-IRQ is last user. */
free = (ptask->outstanding_pkts == 0 && !list_empty(&ptask->pt_link));

if (ptask->outstanding_pkts == 0)
list_del(&ptask->pt_link);

spin_unlock_irqrestore(&dev->lock, flags);

if (ptask->outstanding_pkts > 0) {
u16 dg_size;
Expand Down Expand Up @@ -951,10 +962,10 @@ static void fwnet_transmit_packet_done(struct fwnet_packet_task *ptask)
ptask->max_payload = skb->len + RFC2374_FRAG_HDR_SIZE;
}
fwnet_send_packet(ptask);
} else {
dev_kfree_skb_any(ptask->skb);
kmem_cache_free(fwnet_packet_task_cache, ptask);
}

if (free)
fwnet_free_ptask(ptask);
}

static void fwnet_write_complete(struct fw_card *card, int rcode,
Expand All @@ -977,6 +988,7 @@ static int fwnet_send_packet(struct fwnet_packet_task *ptask)
unsigned tx_len;
struct rfc2734_header *bufhdr;
unsigned long flags;
bool free;

dev = ptask->dev;
tx_len = ptask->max_payload;
Expand Down Expand Up @@ -1022,25 +1034,36 @@ static int fwnet_send_packet(struct fwnet_packet_task *ptask)
generation, SCODE_100, 0ULL, ptask->skb->data,
tx_len + 8, fwnet_write_complete, ptask);

/* FIXME race? */
spin_lock_irqsave(&dev->lock, flags);
list_add_tail(&ptask->pt_link, &dev->broadcasted_list);

/* If the AT tasklet already ran, we may be last user. */
free = (ptask->outstanding_pkts == 0 && list_empty(&ptask->pt_link));
if (!free)
list_add_tail(&ptask->pt_link, &dev->broadcasted_list);

spin_unlock_irqrestore(&dev->lock, flags);

return 0;
goto out;
}

fw_send_request(dev->card, &ptask->transaction,
TCODE_WRITE_BLOCK_REQUEST, ptask->dest_node,
ptask->generation, ptask->speed, ptask->fifo_addr,
ptask->skb->data, tx_len, fwnet_write_complete, ptask);

/* FIXME race? */
spin_lock_irqsave(&dev->lock, flags);
list_add_tail(&ptask->pt_link, &dev->sent_list);

/* If the AT tasklet already ran, we may be last user. */
free = (ptask->outstanding_pkts == 0 && list_empty(&ptask->pt_link));
if (!free)
list_add_tail(&ptask->pt_link, &dev->sent_list);

spin_unlock_irqrestore(&dev->lock, flags);

dev->netdev->trans_start = jiffies;
out:
if (free)
fwnet_free_ptask(ptask);

return 0;
}
Expand Down Expand Up @@ -1298,6 +1321,8 @@ static netdev_tx_t fwnet_tx(struct sk_buff *skb, struct net_device *net)
spin_unlock_irqrestore(&dev->lock, flags);

ptask->max_payload = max_payload;
INIT_LIST_HEAD(&ptask->pt_link);

fwnet_send_packet(ptask);

return NETDEV_TX_OK;
Expand Down
13 changes: 8 additions & 5 deletions trunk/drivers/firewire/ohci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2101,11 +2101,6 @@ static int ohci_queue_iso_transmit(struct fw_iso_context *base,
u32 payload_index, payload_end_index, next_page_index;
int page, end_page, i, length, offset;

/*
* FIXME: Cycle lost behavior should be configurable: lose
* packet, retransmit or terminate..
*/

p = packet;
payload_index = payload;

Expand Down Expand Up @@ -2135,6 +2130,14 @@ static int ohci_queue_iso_transmit(struct fw_iso_context *base,
if (!p->skip) {
d[0].control = cpu_to_le16(DESCRIPTOR_KEY_IMMEDIATE);
d[0].req_count = cpu_to_le16(8);
/*
* Link the skip address to this descriptor itself. This causes
* a context to skip a cycle whenever lost cycles or FIFO
* overruns occur, without dropping the data. The application
* should then decide whether this is an error condition or not.
* FIXME: Make the context's cycle-lost behaviour configurable?
*/
d[0].branch_address = cpu_to_le32(d_bus | z);

header = (__le32 *) &d[1];
header[0] = cpu_to_le32(IT_HEADER_SY(p->sy) |
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/gpu/drm/drm_mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,8 @@ struct drm_mm_node *drm_mm_search_free_in_range(const struct drm_mm *mm,
wasted += alignment - tmp;
}

if (entry->size >= size + wasted) {
if (entry->size >= size + wasted &&
(entry->start + wasted + size) <= end) {
if (!best_match)
return entry;
if (entry->size < best_size) {
Expand Down
5 changes: 4 additions & 1 deletion trunk/drivers/gpu/drm/radeon/atom.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include <linux/module.h>
#include <linux/sched.h>
#include <asm/unaligned.h>

#define ATOM_DEBUG

Expand Down Expand Up @@ -212,7 +213,9 @@ static uint32_t atom_get_src_int(atom_exec_context *ctx, uint8_t attr,
case ATOM_ARG_PS:
idx = U8(*ptr);
(*ptr)++;
val = le32_to_cpu(ctx->ps[idx]);
/* get_unaligned_le32 avoids unaligned accesses from atombios
* tables, noticed on a DEC Alpha. */
val = get_unaligned_le32((u32 *)&ctx->ps[idx]);
if (print)
DEBUG("PS[0x%02X,0x%04X]", idx, val);
break;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/radeon/atombios_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ bool radeon_process_aux_ch(struct radeon_i2c_chan *chan, u8 *req_bytes,
atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args);

if (args.ucReplyStatus && !args.ucDataOutLen) {
if (args.ucReplyStatus == 0x20 && retry_count < 10)
if (args.ucReplyStatus == 0x20 && retry_count++ < 10)
goto retry;
DRM_DEBUG("failed to get auxch %02x%02x %02x %02x 0x%02x %02x after %d retries\n",
req_bytes[1], req_bytes[0], req_bytes[2], req_bytes[3],
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/gpu/drm/ttm/ttm_bo.c
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,12 @@ static int ttm_bo_mem_compat(struct ttm_placement *placement,
struct ttm_mem_reg *mem)
{
int i;
struct drm_mm_node *node = mem->mm_node;

if (node && placement->lpfn != 0 &&
(node->start < placement->fpfn ||
node->start + node->size > placement->lpfn))
return -1;

for (i = 0; i < placement->num_placement; i++) {
if ((placement->placement[i] & mem->placement &
Expand Down
10 changes: 7 additions & 3 deletions trunk/drivers/md/dm-log-userspace-transfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,15 @@ int dm_consult_userspace(const char *uuid, uint64_t luid, int request_type,
{
int r = 0;
size_t dummy = 0;
int overhead_size =
sizeof(struct dm_ulog_request *) + sizeof(struct cn_msg);
int overhead_size = sizeof(struct dm_ulog_request) + sizeof(struct cn_msg);
struct dm_ulog_request *tfr = prealloced_ulog_tfr;
struct receiving_pkg pkg;

/*
* Given the space needed to hold the 'struct cn_msg' and
* 'struct dm_ulog_request' - do we have enough payload
* space remaining?
*/
if (data_size > (DM_ULOG_PREALLOCED_SIZE - overhead_size)) {
DMINFO("Size of tfr exceeds preallocated size");
return -EINVAL;
Expand All @@ -191,7 +195,7 @@ int dm_consult_userspace(const char *uuid, uint64_t luid, int request_type,
*/
mutex_lock(&dm_ulog_lock);

memset(tfr, 0, DM_ULOG_PREALLOCED_SIZE - overhead_size);
memset(tfr, 0, DM_ULOG_PREALLOCED_SIZE - sizeof(struct cn_msg));
memcpy(tfr->uuid, uuid, DM_UUID_LEN);
tfr->luid = luid;
tfr->seq = dm_ulog_seq++;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/dm-raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ static void do_writes(struct mirror_set *ms, struct bio_list *writes)
/*
* Dispatch io.
*/
if (unlikely(ms->log_failure)) {
if (unlikely(ms->log_failure) && errors_handled(ms)) {
spin_lock_irq(&ms->lock);
bio_list_merge(&ms->failures, &sync);
spin_unlock_irq(&ms->lock);
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/md/dm-region-hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -660,10 +660,9 @@ void dm_rh_recovery_end(struct dm_region *reg, int success)
spin_lock_irq(&rh->region_lock);
if (success)
list_add(&reg->list, &reg->rh->recovered_regions);
else {
reg->state = DM_RH_NOSYNC;
else
list_add(&reg->list, &reg->rh->failed_recovered_regions);
}

spin_unlock_irq(&rh->region_lock);

rh->wakeup_workers(rh->context);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/dm-snap-persistent.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ static int chunk_io(struct pstore *ps, void *area, chunk_t chunk, int rw,
* Issue the synchronous I/O from a different thread
* to avoid generic_make_request recursion.
*/
INIT_WORK(&req.work, do_metadata);
INIT_WORK_ON_STACK(&req.work, do_metadata);
queue_work(ps->metadata_wq, &req.work);
flush_workqueue(ps->metadata_wq);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/dm-stripe.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv)
}

stripes = simple_strtoul(argv[0], &end, 10);
if (*end) {
if (!stripes || *end) {
ti->error = "Invalid stripe count";
return -EINVAL;
}
Expand Down
8 changes: 0 additions & 8 deletions trunk/drivers/md/dm-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,13 @@ static struct sysfs_ops dm_sysfs_ops = {
.show = dm_attr_show,
};

/*
* The sysfs structure is embedded in md struct, nothing to do here
*/
static void dm_sysfs_release(struct kobject *kobj)
{
}

/*
* dm kobject is embedded in mapped_device structure
* no need to define release function here
*/
static struct kobj_type dm_ktype = {
.sysfs_ops = &dm_sysfs_ops,
.default_attrs = dm_attrs,
.release = dm_sysfs_release
};

/*
Expand Down
Loading

0 comments on commit e8232bd

Please sign in to comment.