packages: kernel/kernel-grsec_full.patch, kernel/kernel.spec - rel 2; grsec...
arekm
arekm at pld-linux.org
Tue Jan 25 22:15:16 CET 2011
Author: arekm Date: Tue Jan 25 21:15:16 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- rel 2; grsec updated to grsecurity-2.2.1-2.6.37-201101241824.patch (should fix i686 issue)
---- Files affected:
packages/kernel:
kernel-grsec_full.patch (1.56 -> 1.57) , kernel.spec (1.873 -> 1.874)
---- Diffs:
================================================================
Index: packages/kernel/kernel-grsec_full.patch
diff -u packages/kernel/kernel-grsec_full.patch:1.56 packages/kernel/kernel-grsec_full.patch:1.57
--- packages/kernel/kernel-grsec_full.patch:1.56 Wed Jan 19 19:00:46 2011
+++ packages/kernel/kernel-grsec_full.patch Tue Jan 25 22:15:10 2011
@@ -10759,7 +10759,7 @@
obj-y += vmware.o hypervisor.o sched.o mshyperv.o
diff -urNp linux-2.6.37/arch/x86/kernel/cpu/mcheck/mce.c linux-2.6.37/arch/x86/kernel/cpu/mcheck/mce.c
--- linux-2.6.37/arch/x86/kernel/cpu/mcheck/mce.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37/arch/x86/kernel/cpu/mcheck/mce.c 2011-01-17 02:41:01.000000000 -0500
++++ linux-2.6.37/arch/x86/kernel/cpu/mcheck/mce.c 2011-01-24 18:04:15.000000000 -0500
@@ -219,7 +219,7 @@ static void print_mce(struct mce *m)
!(m->mcgstatus & MCG_STATUS_EIPV) ? " !INEXACT!" : "",
m->cs, m->ip);
@@ -10774,7 +10774,7 @@
static DEFINE_SPINLOCK(mce_state_lock);
-static int open_count; /* #times opened */
-+static atomic_t open_count; /* #times opened */
++static local_t open_count; /* #times opened */
static int open_exclu; /* already open exclusive? */
static int mce_open(struct inode *inode, struct file *file)
@@ -10782,7 +10782,7 @@
spin_lock(&mce_state_lock);
- if (open_exclu || (open_count && (file->f_flags & O_EXCL))) {
-+ if (open_exclu || (atomic_read(&open_count) && (file->f_flags & O_EXCL))) {
++ if (open_exclu || (local_read(&open_count) && (file->f_flags & O_EXCL))) {
spin_unlock(&mce_state_lock);
return -EBUSY;
@@ -10791,7 +10791,7 @@
if (file->f_flags & O_EXCL)
open_exclu = 1;
- open_count++;
-+ atomic_inc(&open_count);
++ local_inc(&open_count);
spin_unlock(&mce_state_lock);
@@ -10800,7 +10800,7 @@
spin_lock(&mce_state_lock);
- open_count--;
-+ atomic_dec(&open_count);
++ local_dec(&open_count);
open_exclu = 0;
spin_unlock(&mce_state_lock);
@@ -12777,7 +12777,7 @@
}
diff -urNp linux-2.6.37/arch/x86/kernel/irq_32.c linux-2.6.37/arch/x86/kernel/irq_32.c
--- linux-2.6.37/arch/x86/kernel/irq_32.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37/arch/x86/kernel/irq_32.c 2011-01-17 02:41:01.000000000 -0500
++++ linux-2.6.37/arch/x86/kernel/irq_32.c 2011-01-24 18:04:15.000000000 -0500
@@ -91,7 +91,7 @@ execute_on_irq_stack(int overflow, struc
return 0;
@@ -12810,7 +12810,29 @@
return 1;
}
-@@ -171,9 +180,18 @@ asmlinkage void do_softirq(void)
+@@ -129,8 +138,7 @@ void __cpuinit irq_ctx_init(int cpu)
+ irqctx = page_address(alloc_pages_node(cpu_to_node(cpu),
+ THREAD_FLAGS,
+ THREAD_ORDER));
+- irqctx->tinfo.task = NULL;
+- irqctx->tinfo.exec_domain = NULL;
++ memset(&irqctx->tinfo, 0, sizeof(struct thread_info));
+ irqctx->tinfo.cpu = cpu;
+ irqctx->tinfo.preempt_count = HARDIRQ_OFFSET;
+ irqctx->tinfo.addr_limit = MAKE_MM_SEG(0);
+@@ -140,10 +148,8 @@ void __cpuinit irq_ctx_init(int cpu)
+ irqctx = page_address(alloc_pages_node(cpu_to_node(cpu),
+ THREAD_FLAGS,
+ THREAD_ORDER));
+- irqctx->tinfo.task = NULL;
+- irqctx->tinfo.exec_domain = NULL;
++ memset(&irqctx->tinfo, 0, sizeof(struct thread_info));
+ irqctx->tinfo.cpu = cpu;
+- irqctx->tinfo.preempt_count = 0;
+ irqctx->tinfo.addr_limit = MAKE_MM_SEG(0);
+
+ per_cpu(softirq_ctx, cpu) = irqctx;
+@@ -171,9 +177,18 @@ asmlinkage void do_softirq(void)
irqctx->tinfo.previous_esp = current_stack_pointer;
/* build the stack frame on the softirq stack */
@@ -15934,16 +15956,20 @@
ret
diff -urNp linux-2.6.37/arch/x86/lib/insn.c linux-2.6.37/arch/x86/lib/insn.c
--- linux-2.6.37/arch/x86/lib/insn.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37/arch/x86/lib/insn.c 2011-01-17 02:41:01.000000000 -0500
-@@ -21,6 +21,7 @@
++++ linux-2.6.37/arch/x86/lib/insn.c 2011-01-24 18:04:15.000000000 -0500
+@@ -21,6 +21,11 @@
#include <linux/string.h>
#include <asm/inat.h>
#include <asm/insn.h>
++#ifdef __KERNEL__
+#include <asm/pgtable_types.h>
++#else
++#define ktla_ktva(addr) addr
++#endif
#define get_next(t, insn) \
({t r; r = *(t*)insn->next_byte; insn->next_byte += sizeof(t); r; })
-@@ -40,8 +41,8 @@
+@@ -40,8 +45,8 @@
void insn_init(struct insn *insn, const void *kaddr, int x86_64)
{
memset(insn, 0, sizeof(*insn));
@@ -23504,13 +23530,13 @@
diff -urNp linux-2.6.37/drivers/char/hvcs.c linux-2.6.37/drivers/char/hvcs.c
--- linux-2.6.37/drivers/char/hvcs.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37/drivers/char/hvcs.c 2011-01-17 02:41:01.000000000 -0500
++++ linux-2.6.37/drivers/char/hvcs.c 2011-01-24 18:04:15.000000000 -0500
@@ -270,7 +270,7 @@ struct hvcs_struct {
unsigned int index;
struct tty_struct *tty;
- int open_count;
-+ atomic_t open_count;
++ local_t open_count;
/*
* Used to tell the driver kernel_thread what operations need to take
@@ -23519,7 +23545,7 @@
spin_lock_irqsave(&hvcsd->lock, flags);
- if (hvcsd->open_count > 0) {
-+ if (atomic_read(&hvcsd->open_count) > 0) {
++ if (local_read(&hvcsd->open_count) > 0) {
spin_unlock_irqrestore(&hvcsd->lock, flags);
printk(KERN_INFO "HVCS: vterm state unchanged. "
"The hvcs device node is still in use.\n");
@@ -23528,7 +23554,7 @@
goto error_release;
- hvcsd->open_count = 1;
-+ atomic_set(&hvcsd->open_count, 1);
++ local_set(&hvcsd->open_count, 1);
hvcsd->tty = tty;
tty->driver_data = hvcsd;
@@ -23537,7 +23563,7 @@
spin_lock_irqsave(&hvcsd->lock, flags);
kref_get(&hvcsd->kref);
- hvcsd->open_count++;
-+ atomic_inc(&hvcsd->open_count);
++ local_inc(&hvcsd->open_count);
hvcsd->todo_mask |= HVCS_SCHED_READ;
spin_unlock_irqrestore(&hvcsd->lock, flags);
@@ -23546,7 +23572,7 @@
spin_lock_irqsave(&hvcsd->lock, flags);
- if (--hvcsd->open_count == 0) {
-+ if (atomic_dec_and_test(&hvcsd->open_count)) {
++ if (local_dec_and_test(&hvcsd->open_count)) {
vio_disable_interrupts(hvcsd->vdev);
@@ -23555,11 +23581,11 @@
kref_put(&hvcsd->kref, destroy_hvcs_struct);
return;
- } else if (hvcsd->open_count < 0) {
-+ } else if (atomic_read(&hvcsd->open_count) < 0) {
++ } else if (local_read(&hvcsd->open_count) < 0) {
printk(KERN_ERR "HVCS: vty-server@%X open_count: %d"
" is missmanaged.\n",
- hvcsd->vdev->unit_address, hvcsd->open_count);
-+ hvcsd->vdev->unit_address, atomic_read(&hvcsd->open_count));
++ hvcsd->vdev->unit_address, local_read(&hvcsd->open_count));
}
spin_unlock_irqrestore(&hvcsd->lock, flags);
@@ -23568,7 +23594,7 @@
spin_lock_irqsave(&hvcsd->lock, flags);
/* Preserve this so that we know how many kref refs to put */
- temp_open_count = hvcsd->open_count;
-+ temp_open_count = atomic_read(&hvcsd->open_count);
++ temp_open_count = local_read(&hvcsd->open_count);
/*
* Don't kref put inside the spinlock because the destruction
@@ -23577,7 +23603,7 @@
hvcsd->tty = NULL;
- hvcsd->open_count = 0;
-+ atomic_set(&hvcsd->open_count, 0);
++ local_set(&hvcsd->open_count, 0);
/* This will drop any buffered data on the floor which is OK in a hangup
* scenario. */
@@ -23586,7 +23612,7 @@
* but we want to keep it all in the spinlock.
*/
- if (hvcsd->open_count <= 0) {
-+ if (atomic_read(&hvcsd->open_count) <= 0) {
++ if (local_read(&hvcsd->open_count) <= 0) {
spin_unlock_irqrestore(&hvcsd->lock, flags);
return -ENODEV;
}
@@ -23595,7 +23621,7 @@
struct hvcs_struct *hvcsd = tty->driver_data;
- if (!hvcsd || hvcsd->open_count <= 0)
-+ if (!hvcsd || atomic_read(&hvcsd->open_count) <= 0)
++ if (!hvcsd || local_read(&hvcsd->open_count) <= 0)
return 0;
return HVCS_BUFF_LEN - hvcsd->chars_in_buffer;
@@ -23900,13 +23926,13 @@
static int __init nvram_init(void)
diff -urNp linux-2.6.37/drivers/char/pcmcia/ipwireless/tty.c linux-2.6.37/drivers/char/pcmcia/ipwireless/tty.c
--- linux-2.6.37/drivers/char/pcmcia/ipwireless/tty.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37/drivers/char/pcmcia/ipwireless/tty.c 2011-01-17 02:41:01.000000000 -0500
++++ linux-2.6.37/drivers/char/pcmcia/ipwireless/tty.c 2011-01-24 18:04:15.000000000 -0500
@@ -51,7 +51,7 @@ struct ipw_tty {
int tty_type;
struct ipw_network *network;
struct tty_struct *linux_tty;
- int open_count;
-+ atomic_t open_count;
++ local_t open_count;
unsigned int control_lines;
struct mutex ipw_tty_mutex;
int tx_bytes_queued;
@@ -23915,11 +23941,11 @@
return -ENODEV;
}
- if (tty->open_count == 0)
-+ if (atomic_read(&tty->open_count) == 0)
++ if (local_read(&tty->open_count) == 0)
tty->tx_bytes_queued = 0;
- tty->open_count++;
-+ atomic_inc(&tty->open_count);
++ local_inc(&tty->open_count);
tty->linux_tty = linux_tty;
linux_tty->driver_data = tty;
@@ -23930,7 +23956,7 @@
- tty->open_count--;
-
- if (tty->open_count == 0) {
-+ if (atomic_dec_return(&tty->open_count) == 0) {
++ if (local_dec_return(&tty->open_count) == 0) {
struct tty_struct *linux_tty = tty->linux_tty;
if (linux_tty != NULL) {
@@ -23939,7 +23965,7 @@
mutex_lock(&tty->ipw_tty_mutex);
- if (tty->open_count == 0) {
-+ if (atomic_read(&tty->open_count) == 0) {
++ if (local_read(&tty->open_count) == 0) {
mutex_unlock(&tty->ipw_tty_mutex);
return;
}
@@ -23948,7 +23974,7 @@
}
- if (!tty->open_count) {
-+ if (!atomic_read(&tty->open_count)) {
++ if (!local_read(&tty->open_count)) {
mutex_unlock(&tty->ipw_tty_mutex);
return;
}
@@ -23957,7 +23983,7 @@
mutex_lock(&tty->ipw_tty_mutex);
- if (!tty->open_count) {
-+ if (!atomic_read(&tty->open_count)) {
++ if (!local_read(&tty->open_count)) {
mutex_unlock(&tty->ipw_tty_mutex);
return -EINVAL;
}
@@ -23966,7 +23992,7 @@
return -ENODEV;
- if (!tty->open_count)
-+ if (!atomic_read(&tty->open_count))
++ if (!local_read(&tty->open_count))
return -EINVAL;
room = IPWIRELESS_TX_QUEUE_SIZE - tty->tx_bytes_queued;
@@ -23975,7 +24001,7 @@
return 0;
- if (!tty->open_count)
-+ if (!atomic_read(&tty->open_count))
++ if (!local_read(&tty->open_count))
return 0;
return tty->tx_bytes_queued;
@@ -23984,7 +24010,7 @@
return -ENODEV;
- if (!tty->open_count)
-+ if (!atomic_read(&tty->open_count))
++ if (!local_read(&tty->open_count))
return -EINVAL;
return get_control_lines(tty);
@@ -23993,7 +24019,7 @@
return -ENODEV;
- if (!tty->open_count)
-+ if (!atomic_read(&tty->open_count))
++ if (!local_read(&tty->open_count))
return -EINVAL;
return set_control_lines(tty, set, clear);
@@ -24002,7 +24028,7 @@
return -ENODEV;
- if (!tty->open_count)
-+ if (!atomic_read(&tty->open_count))
++ if (!local_read(&tty->open_count))
return -EINVAL;
/* FIXME: Exactly how is the tty object locked here .. */
@@ -24011,7 +24037,7 @@
mutex_lock(&ttyj->ipw_tty_mutex);
}
- while (ttyj->open_count)
-+ while (atomic_read(&ttyj->open_count))
++ while (local_read(&ttyj->open_count))
do_ipw_close(ttyj);
ipwireless_disassociate_network_ttys(network,
ttyj->channel_idx);
@@ -24070,13 +24096,13 @@
diff -urNp linux-2.6.37/drivers/char/sonypi.c linux-2.6.37/drivers/char/sonypi.c
--- linux-2.6.37/drivers/char/sonypi.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37/drivers/char/sonypi.c 2011-01-17 02:41:01.000000000 -0500
++++ linux-2.6.37/drivers/char/sonypi.c 2011-01-24 18:04:15.000000000 -0500
@@ -491,7 +491,7 @@ static struct sonypi_device {
spinlock_t fifo_lock;
wait_queue_head_t fifo_proc_list;
struct fasync_struct *fifo_async;
- int open_count;
-+ atomic_t open_count;
++ local_t open_count;
int model;
struct input_dev *input_jog_dev;
struct input_dev *input_key_dev;
@@ -24085,7 +24111,7 @@
{
mutex_lock(&sonypi_device.lock);
- sonypi_device.open_count--;
-+ atomic_dec(&sonypi_device.open_count);
++ local_dec(&sonypi_device.open_count);
mutex_unlock(&sonypi_device.lock);
return 0;
}
@@ -24094,10 +24120,10 @@
mutex_lock(&sonypi_device.lock);
/* Flush input queue on first open */
- if (!sonypi_device.open_count)
-+ if (!atomic_read(&sonypi_device.open_count))
++ if (!local_read(&sonypi_device.open_count))
kfifo_reset(&sonypi_device.fifo);
- sonypi_device.open_count++;
-+ atomic_inc(&sonypi_device.open_count);
++ local_inc(&sonypi_device.open_count);
mutex_unlock(&sonypi_device.lock);
return 0;
@@ -24242,7 +24268,7 @@
DRM_DEBUG("pid=%d, cmd=0x%02x, nr=0x%02x, dev 0x%lx, auth=%d\n",
diff -urNp linux-2.6.37/drivers/gpu/drm/drm_fops.c linux-2.6.37/drivers/gpu/drm/drm_fops.c
--- linux-2.6.37/drivers/gpu/drm/drm_fops.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37/drivers/gpu/drm/drm_fops.c 2011-01-17 02:41:01.000000000 -0500
++++ linux-2.6.37/drivers/gpu/drm/drm_fops.c 2011-01-24 18:04:15.000000000 -0500
@@ -70,7 +70,7 @@ static int drm_setup(struct drm_device *
}
@@ -24259,7 +24285,7 @@
- atomic_inc(&dev->counts[_DRM_STAT_OPENS]);
- if (!dev->open_count++)
+ atomic_inc_unchecked(&dev->counts[_DRM_STAT_OPENS]);
-+ if (atomic_inc_return(&dev->open_count) == 1)
++ if (local_inc_return(&dev->open_count) == 1)
retcode = drm_setup(dev);
}
if (!retcode) {
@@ -24268,7 +24294,7 @@
mutex_lock(&drm_global_mutex);
- DRM_DEBUG("open_count = %d\n", dev->open_count);
-+ DRM_DEBUG("open_count = %d\n", atomic_read(&dev->open_count));
++ DRM_DEBUG("open_count = %d\n", local_read(&dev->open_count));
if (dev->driver->preclose)
dev->driver->preclose(dev, file_priv);
@@ -24277,7 +24303,7 @@
task_pid_nr(current),
(long)old_encode_dev(file_priv->minor->device),
- dev->open_count);
-+ atomic_read(&dev->open_count));
++ local_read(&dev->open_count));
/* if the master has gone away we can't do anything with the lock */
if (file_priv->minor->master)
@@ -24288,7 +24314,7 @@
- atomic_inc(&dev->counts[_DRM_STAT_CLOSES]);
- if (!--dev->open_count) {
+ atomic_inc_unchecked(&dev->counts[_DRM_STAT_CLOSES]);
-+ if (atomic_dec_and_test(&dev->open_count)) {
++ if (local_dec_and_test(&dev->open_count)) {
if (atomic_read(&dev->ioctl_count)) {
DRM_ERROR("Device busy: %d\n",
atomic_read(&dev->ioctl_count));
@@ -24538,13 +24564,13 @@
.mode_valid = tfp410_mode_valid,
diff -urNp linux-2.6.37/drivers/gpu/drm/i915/i915_dma.c linux-2.6.37/drivers/gpu/drm/i915/i915_dma.c
--- linux-2.6.37/drivers/gpu/drm/i915/i915_dma.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37/drivers/gpu/drm/i915/i915_dma.c 2011-01-17 02:41:01.000000000 -0500
++++ linux-2.6.37/drivers/gpu/drm/i915/i915_dma.c 2011-01-24 18:04:15.000000000 -0500
@@ -1191,7 +1191,7 @@ static bool i915_switcheroo_can_switch(s
bool can_switch;
spin_lock(&dev->count_lock);
- can_switch = (dev->open_count == 0);
-+ can_switch = (atomic_read(&dev->open_count) == 0);
++ can_switch = (local_read(&dev->open_count) == 0);
spin_unlock(&dev->count_lock);
return can_switch;
}
@@ -24594,13 +24620,13 @@
.update_status = nv50_set_intensity,
diff -urNp linux-2.6.37/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.37/drivers/gpu/drm/nouveau/nouveau_state.c
--- linux-2.6.37/drivers/gpu/drm/nouveau/nouveau_state.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37/drivers/gpu/drm/nouveau/nouveau_state.c 2011-01-17 02:41:01.000000000 -0500
++++ linux-2.6.37/drivers/gpu/drm/nouveau/nouveau_state.c 2011-01-24 18:04:15.000000000 -0500
@@ -546,7 +546,7 @@ static bool nouveau_switcheroo_can_switc
bool can_switch;
spin_lock(&dev->count_lock);
- can_switch = (dev->open_count == 0);
-+ can_switch = (atomic_read(&dev->open_count) == 0);
++ can_switch = (local_read(&dev->open_count) == 0);
spin_unlock(&dev->count_lock);
return can_switch;
}
@@ -24626,13 +24652,13 @@
(&mask_rex, "(0x[0-9a-fA-F]*) *([_a-zA-Z0-9]*)", REG_EXTENDED)) {
diff -urNp linux-2.6.37/drivers/gpu/drm/radeon/radeon_device.c linux-2.6.37/drivers/gpu/drm/radeon/radeon_device.c
--- linux-2.6.37/drivers/gpu/drm/radeon/radeon_device.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37/drivers/gpu/drm/radeon/radeon_device.c 2011-01-17 02:41:01.000000000 -0500
++++ linux-2.6.37/drivers/gpu/drm/radeon/radeon_device.c 2011-01-24 18:04:15.000000000 -0500
@@ -659,7 +659,7 @@ static bool radeon_switcheroo_can_switch
bool can_switch;
spin_lock(&dev->count_lock);
- can_switch = (dev->open_count == 0);
-+ can_switch = (atomic_read(&dev->open_count) == 0);
++ can_switch = (local_read(&dev->open_count) == 0);
spin_unlock(&dev->count_lock);
return can_switch;
}
@@ -25243,31 +25269,31 @@
MODULE_DEVICE_TABLE(serio, serio_raw_serio_ids);
diff -urNp linux-2.6.37/drivers/isdn/gigaset/common.c linux-2.6.37/drivers/isdn/gigaset/common.c
--- linux-2.6.37/drivers/isdn/gigaset/common.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37/drivers/isdn/gigaset/common.c 2011-01-17 02:41:01.000000000 -0500
++++ linux-2.6.37/drivers/isdn/gigaset/common.c 2011-01-24 18:04:15.000000000 -0500
@@ -723,7 +723,7 @@ struct cardstate *gigaset_initcs(struct
cs->commands_pending = 0;
cs->cur_at_seq = 0;
cs->gotfwver = -1;
- cs->open_count = 0;
-+ atomic_set(&cs->open_count, 0);
++ local_set(&cs->open_count, 0);
cs->dev = NULL;
cs->tty = NULL;
cs->tty_dev = NULL;
diff -urNp linux-2.6.37/drivers/isdn/gigaset/gigaset.h linux-2.6.37/drivers/isdn/gigaset/gigaset.h
--- linux-2.6.37/drivers/isdn/gigaset/gigaset.h 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37/drivers/isdn/gigaset/gigaset.h 2011-01-17 02:41:01.000000000 -0500
++++ linux-2.6.37/drivers/isdn/gigaset/gigaset.h 2011-01-24 18:04:15.000000000 -0500
@@ -433,7 +433,7 @@ struct cardstate {
spinlock_t cmdlock;
unsigned curlen, cmdbytes;
- unsigned open_count;
-+ atomic_t open_count;
++ local_t open_count;
struct tty_struct *tty;
struct tasklet_struct if_wake_tasklet;
unsigned control_state;
diff -urNp linux-2.6.37/drivers/isdn/gigaset/interface.c linux-2.6.37/drivers/isdn/gigaset/interface.c
--- linux-2.6.37/drivers/isdn/gigaset/interface.c 2011-01-04 19:50:19.000000000 -0500
-+++ linux-2.6.37/drivers/isdn/gigaset/interface.c 2011-01-17 02:41:01.000000000 -0500
++++ linux-2.6.37/drivers/isdn/gigaset/interface.c 2011-01-24 18:04:15.000000000 -0500
@@ -160,9 +160,7 @@ static int if_open(struct tty_struct *tt
return -ERESTARTSYS;
tty->driver_data = cs;
@@ -25275,7 +25301,7 @@
- ++cs->open_count;
-
- if (cs->open_count == 1) {
-+ if (atomic_inc_return(&cs->open_count) == 1) {
++ if (local_inc_return(&cs->open_count) == 1) {
spin_lock_irqsave(&cs->lock, flags);
cs->tty = tty;
spin_unlock_irqrestore(&cs->lock, flags);
@@ -25284,11 +25310,11 @@
if (!cs->connected)
gig_dbg(DEBUG_IF, "not connected"); /* nothing to do */
- else if (!cs->open_count)
-+ else if (!atomic_read(&cs->open_count))
++ else if (!local_read(&cs->open_count))
dev_warn(cs->dev, "%s: device not opened\n", __func__);
else {
- if (!--cs->open_count) {
-+ if (!atomic_dec_return(&cs->open_count)) {
++ if (!local_dec_return(&cs->open_count)) {
spin_lock_irqsave(&cs->lock, flags);
cs->tty = NULL;
spin_unlock_irqrestore(&cs->lock, flags);
@@ -25297,7 +25323,7 @@
gig_dbg(DEBUG_IF, "not connected");
retval = -ENODEV;
- } else if (!cs->open_count)
-+ } else if (!atomic_read(&cs->open_count))
++ } else if (!local_read(&cs->open_count))
dev_warn(cs->dev, "%s: device not opened\n", __func__);
else {
retval = 0;
@@ -25306,7 +25332,7 @@
goto done;
}
- if (!cs->open_count) {
-+ if (!atomic_read(&cs->open_count)) {
++ if (!local_read(&cs->open_count)) {
dev_warn(cs->dev, "%s: device not opened\n", __func__);
retval = -ENODEV;
goto done;
@@ -25315,7 +25341,7 @@
gig_dbg(DEBUG_IF, "not connected");
retval = -ENODEV;
- } else if (!cs->open_count)
-+ } else if (!atomic_read(&cs->open_count))
++ } else if (!local_read(&cs->open_count))
dev_warn(cs->dev, "%s: device not opened\n", __func__);
else if (cs->mstate != MS_LOCKED) {
dev_warn(cs->dev, "can't write to unlocked device\n");
@@ -25324,7 +25350,7 @@
if (!cs->connected)
gig_dbg(DEBUG_IF, "not connected");
- else if (!cs->open_count)
-+ else if (!atomic_read(&cs->open_count))
++ else if (!local_read(&cs->open_count))
dev_warn(cs->dev, "%s: device not opened\n", __func__);
else if (cs->mstate != MS_LOCKED)
dev_warn(cs->dev, "can't write to unlocked device\n");
@@ -25333,7 +25359,7 @@
if (!cs->connected)
gig_dbg(DEBUG_IF, "not connected"); /* nothing to do */
- else if (!cs->open_count)
-+ else if (!atomic_read(&cs->open_count))
++ else if (!local_read(&cs->open_count))
dev_warn(cs->dev, "%s: device not opened\n", __func__);
else
gig_dbg(DEBUG_IF, "%s: not implemented\n", __func__);
@@ -25342,7 +25368,7 @@
if (!cs->connected)
gig_dbg(DEBUG_IF, "not connected"); /* nothing to do */
- else if (!cs->open_count)
-+ else if (!atomic_read(&cs->open_count))
++ else if (!local_read(&cs->open_count))
dev_warn(cs->dev, "%s: device not opened\n", __func__);
else
gig_dbg(DEBUG_IF, "%s: not implemented\n", __func__);
@@ -25351,7 +25377,7 @@
}
- if (!cs->open_count) {
-+ if (!atomic_read(&cs->open_count)) {
++ if (!local_read(&cs->open_count)) {
dev_warn(cs->dev, "%s: device not opened\n", __func__);
goto out;
}
@@ -25660,6 +25686,18 @@
struct file_operations *dvbdevfops;
struct device *clsdev;
int minor;
+diff -urNp linux-2.6.37/drivers/media/dvb/ttpci/av7110_ca.c linux-2.6.37/drivers/media/dvb/ttpci/av7110_ca.c
+--- linux-2.6.37/drivers/media/dvb/ttpci/av7110_ca.c 2011-01-04 19:50:19.000000000 -0500
++++ linux-2.6.37/drivers/media/dvb/ttpci/av7110_ca.c 2011-01-24 18:13:05.000000000 -0500
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-grsec_full.patch?r1=1.56&r2=1.57&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel.spec?r1=1.873&r2=1.874&f=u
More information about the pld-cvs-commit
mailing list