Florin Malita [Mon, 15 Oct 2007 15:59:18 +0000 (12:59 -0300)]
V4L/DVB (6350): V4L: possible leak in em28xx_init_isoc
Coverity (CID 1929) spotted the following: if a transfer buffer
allocation fails, the last allocated urb is leaked (it hasn't been
stored in dev->urb[] yet so em28xx_uninit_isoc misses it). The patch
also includes a small typo fix.
Hans Verkuil [Sun, 14 Oct 2007 20:19:37 +0000 (17:19 -0300)]
V4L/DVB (6347): ivtv: fix video mute when radio is used
When the radio is active the video should be muted when a capture
starts. However, this was done at the wrong time and the mute settings
were overwritten when cx2341x_update was called.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Ian Armstrong [Sun, 14 Oct 2007 16:12:28 +0000 (13:12 -0300)]
V4L/DVB (6346): ivtvfb: YUV output size fix when ivtvfb is not loaded
If the ivtvfb module isn't loaded, the valid YUV output area should be set to
full-screen. This patch fixes the case where the valid output area was not
reset when the output broadcast format was changed from NTSC to PAL. This
resulted in output being limited to the top 480 lines of the display.
Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Ian Armstrong [Sun, 14 Oct 2007 16:08:02 +0000 (13:08 -0300)]
V4L/DVB (6345): ivtvfb: YUV handling of an image which is not visible in the display area
When the ivtvfb module is loaded, the YUV output is relative to the
framebuffer output. When a virtual screen size is used, the output area for
the YUV may actually be off screen. To prevent the hardware from crashing,
the current driver will ignore an off-screen position and leave the output
visible at the last on-screen position. This may not be desirable, so this
patch will switch off the YUV output should the image move off-screen, and
re-enable it should the image move on-screen again.
Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
If you try to access the video device from within an udev rule,
then you get into a circular locking situation.
Changed the driver to postpone the registration of the devices until
everything else has been fully initialized, so that the newly created
device can be used immediately.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Ian Armstrong [Fri, 12 Oct 2007 11:15:41 +0000 (08:15 -0300)]
V4L/DVB (6340): ivtvfb: screen mode change sometimes goes wrong
This patch partially reverts a previous change that caused the
CX2341X_OSD_SET_PIXEL_FORMAT firmware calls to be skipped when the pixel
format of the framebuffer wasn't altered by FBIOPUT_VSCREENINFO.
Unfortunately, another firmware call on the PVR350 sometimes scrambles the
display when trying to adjust the framebuffer settings. This patch re-enables
the CX2341X_OSD_SET_PIXEL_FORMAT calls to try and prevent this from
occurring.
Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Trent Piepho [Fri, 5 Oct 2007 14:28:09 +0000 (11:28 -0300)]
V4L/DVB (6336): cx8802: Plug memory leak when unregistering a driver
When a cx8802 sub-driver was unregistered, the struct cx8802_driver, which was
kmalloc()ed by cx8802_register_driver(), was deleted from the list of drivers,
but never freed.
Trent Piepho [Sun, 14 Oct 2007 05:52:17 +0000 (02:52 -0300)]
V4L/DVB (6334): cx88: Change (struct cx8802_dev)->drvlist to a list_head and fix bugs
It was a struct cx8802_driver for no apparent reason. Nothing uses a
cx8802_driver in the cx8802_dev struct. The only field that was used was
devlist, a list_head.
The code in cx8802_remove() that removed any loaded sub-drivers was broken.
It would delete the current list entry, but didn't use list_for_each_safe. It
also called list_del() on the list _head_ inside the list_for_each loop? It
would crash if it was run, which I don't think can ever happen.
Since the cx8802 sub-drivers use the cx8802 driver, they have to be unloaded
first. So there isn't any way for a sub-driver to still be loaded when
cx8802_remove() is called... Except maybe with PCI hot-plug, if one removes
the PCI card while the drivers are loaded?
So I left some code in to handle that if it's actually possible. It will
remove the sub-drivers from the device cx8802_remove() was called on, and only
that device. If one has two DVB cards and unplugs one, there is no reason to
unload the DVB drivers for both cards. I have no way to test this, but it
can't be worse than what was there before.
cx8802_get_driver() is passed a cx8802_dev pointer and looks for the requested
driver on that device. It first loops over the cx8802 device list looking for
the device it was passed, which is pointless. It doesn't need to find the
device pointer in the list, as it already has the pointer.
The list_head in the cx8802_driver struct, which joins all the _drivers_
attached to a device, was named devlist. Changed that to drvlist, since the
devlist is used for a list of _devices_ in other cx8802 structs.
Trent Piepho [Sun, 14 Oct 2007 05:52:16 +0000 (02:52 -0300)]
V4L/DVB (6333): cx88: Change void* card_priv to struct vp3054_i2c_state
card_priv was only used to store a pointer to the vp3054 state struct.
There's no need to use a void * since it doesn't have multiple types.
Make the field conditional on VP3045 support. It was already conditional on
DVB support, but it's only used if VP3045 support is on, so that makes for a
better option to check.
Florin Malita [Sat, 13 Oct 2007 14:49:52 +0000 (11:49 -0300)]
V4L/DVB (6325): Double-free in cx23885_initdev
Both cx23885_initdev and cx23885_dev_setup free the device in their
error path so a failure in the latter causes a double-free. Since
cx23885_dev_setup is only called from cx23885_initdev, it should be safe
to remove its deallocation and leave the cleanup up to the allocating
function.
Pekka Enberg [Sat, 13 Oct 2007 08:54:54 +0000 (05:54 -0300)]
V4L/DVB (6324): fix videobuf_cgmbuf export
As videobuf_cgmbuf is defined only if CONFIG_VIDEO_V4L1_COMPAT is enabled,
move the EXPORT_SYMBOL_GPL declaration inside the #ifdef block. Fixes
compilation for x86_64 defconfig.
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Jiri Slaby [Mon, 15 Oct 2007 16:07:30 +0000 (13:07 -0300)]
V4L/DVB (6323): V4L: cinergyT2, remove bad usage of ERESTARTSYS
cinergyT2, remove bad usage of ERESTARTSYS
test of cinergyt2->disconnect_pending doesn't ensure pending signal and so
ERESTARTSYS would reach userspace, which is not permitted. Change it to
EAGAIN.
V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 field
struct video_device used to define a .hardware field. While
initialized on severl drivers, this field is never used inside V4L.
However, drivers using it need to include the old V4L1 header.
This seems to cause compilation troubles with some random configs.
Better just to remove it from all drivers.
V4L/DVB (6185): cx88-alsa: Add mute controls, change control names
Add two mute controls. One mutes everything, the other just mutes the analog
pass-through output.
Rename the existing volume control. The controls are now:
Playback Volume
Playback Switch
Capture Switch
These names might seem odd, but I believe they are more correct. The previous
"Capture Volume" control didn't actually effect the volume of the captured
audio. Instead it controls the volume of the analog pass-thought output. It
appears that pass-through controls like this are usually considered to be in
the playback direction, not capture. For example, "CAPTURE feedback Playback
Volume" is the name used for a control that appears to have the same effect in
the ca0106 driver. We only have one volume control, so we can omit the
"CAPTURE feedback" part.
If someone where to add PCM playback support to the driver, then this would be
the volume control.
Linus Torvalds [Sun, 21 Oct 2007 16:57:55 +0000 (09:57 -0700)]
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfin-2.6
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfin-2.6:
Blackfin arch: update boards files
Blackfin arch: dma add some API and cleanup bf54x DMA definition
Blackfin arch: cleanup and promote the general purpose timers api to a core blackfin component
Blackfin arch: add a cheesy install target
Blackfin arch: add functions for converting between sclks and usecs
Blackfin arch: add assembly function for doing 64bit unsigned division
Blackfin arch: -mno-fdpic works
Blackfin arch: use "char bfin_board_name[]" rather than "char *bfin_board_name" per discussion on lkml as the former uses less storage
Blackfin arch: Fixing Bug: balance calls to get_task_mm with corresponding mmput calls
Blackfin serial driver Kconfig: depend on DMA not being enabled rather than a specific DMA size
Blackfin arch: Fix bug: missing CHIPID register field definition of BF54x
Blackfin arch: Fix up /proc/cpuinfo so it is like everyone else
Blackfin arch: Optimization - no need to make additional math here
Blackfin arch: force irq_flags into the .data section
Blackfin arch BF548 defconfig: enable watchdog by default
Blackfin arch: add new processor ADSP-BF52x arch/mach support
Linus Torvalds [Sun, 21 Oct 2007 15:54:32 +0000 (08:54 -0700)]
Merge branch 'audit.b43' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current
* 'audit.b43' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
[PATCH] audit: watching subtrees
[PATCH] new helper - inotify_evict_watch()
[PATCH] new helper - inotify_clone_watch()
[PATCH] new helpers - collect_mounts() and release_collected_mounts()
[PATCH] pass dentry to audit_inode()/audit_inode_child()
Nick Piggin [Sun, 21 Oct 2007 04:57:41 +0000 (06:57 +0200)]
nobh: nobh_write_end fix
This path mustn't have been tested :( I did attempt to exercise it
by injecting failures here, but I suspect PageMappedToDisk may have
been getting in the way. Will need more of a look, although I think
nobh mode is OK for an -rc1 (it shouldn't eat anyone's data).
Bernd Schmidt [Sun, 21 Oct 2007 14:32:27 +0000 (22:32 +0800)]
Blackfin arch: Fixing Bug: balance calls to get_task_mm with corresponding mmput calls
We must balance calls to get_task_mm with corresponding mmput calls, otherwise
refcounting is screwed up and mms don't get freed when their task exits.
Robin Getz [Sun, 21 Oct 2007 09:03:31 +0000 (17:03 +0800)]
Blackfin arch: Fix up /proc/cpuinfo so it is like everyone else
Fix up /proc/cpuinfo so it is like everyone else, and gets
parsed by various applications properly. Still needs some tweaking on
parts without full L1 sram, like 532, 531, so it doesn't print out L1
bank info that doesn't exist.
Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Mike Frysinger [Sun, 21 Oct 2007 16:19:31 +0000 (00:19 +0800)]
Blackfin arch: force irq_flags into the .data section
force irq_flags into the .data section by initializing it to
the hardware masks that cannot be disabled. this way if we
use irq enable/disable functions before the .bss has been
zeroed out (as does our l1 relocate/dma functions), we dont
hit a problem where bss contains bogus crap.
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Al Viro [Sun, 22 Jul 2007 12:04:18 +0000 (08:04 -0400)]
[PATCH] audit: watching subtrees
New kind of audit rule predicates: "object is visible in given subtree".
The part that can be sanely implemented, that is. Limitations:
* if you have hardlink from outside of tree, you'd better watch
it too (or just watch the object itself, obviously)
* if you mount something under a watched tree, tell audit
that new chunk should be added to watched subtrees
* if you umount something in a watched tree and it's still mounted
elsewhere, you will get matches on events happening there. New command
tells audit to recalculate the trees, trimming such sources of false
positives.
Note that it's _not_ about path - if something mounted in several places
(multiple mount, bindings, different namespaces, etc.), the match does
_not_ depend on which one we are using for access.
Linus Torvalds [Sun, 21 Oct 2007 03:19:15 +0000 (20:19 -0700)]
Merge branch 'master' of hera.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6
* 'master' of hera.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6: (29 commits)
[PARISC] fix uninitialized variable warning in asm/rtc.h
[PARISC] Port checkstack.pl to parisc
[PARISC] Make palo target work when $obj != $src
[PARISC] Zap unused variable warnings in pci.c
[PARISC] Fix tests in palo target
[PARISC] Fix palo target
[PARISC] Restore palo target
[PARISC] Attempt to clean up parisc/Makefile
[PARISC] Fix infinite loop in /proc/iomem
[PARISC] Quiet sysfs_create_link __must_check warnings in pdc_stable
[PARISC] Squelch pci_enable_device __must_check warning in superio
[PARISC] Kill off broken irqstack code
[PARISC] Remove hardcoded uses of PAGE_SIZE
[PARISC] Clean up pointless ASM_PAGE_SIZE_DIV use
[PARISC] Kill off the last vestiges of ASM_PAGE_SIZE
[PARISC] Kill off ASM_PAGE_SIZE use
[PARISC] Beautify parisc vmlinux.lds.S
[PARISC] Clean up a resource_size_t warning in sba_iommu
[PARISC] Kill incorrect cast warning in unwinder
[PARISC] Kill zone_to_nid printk warning
...
Fixed trivial conflict in include/asm-parisc/tlbflush.h manually
* ssh://master.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
kbuild: restore arch/{ppc/xtensa}/boot cflags
kconfig: set title bar in xconfig
kbuild: fix toplevel Makefile/depmod
Kyle McMartin [Sat, 20 Oct 2007 20:23:00 +0000 (13:23 -0700)]
[PARISC] fix uninitialized variable warning in asm/rtc.h
get_rtc_time, in the case that PDC returns that the battery is bad, returns
an unmodified rtc_time arg to the caller, which then uses uninitialized
values. Fix this by memset-ing the arg with zeroes, so it will at least be
cleared if we return failure.
Milton Miller [Sat, 20 Oct 2007 08:58:03 +0000 (03:58 -0500)]
kbuild: restore arch/{ppc/xtensa}/boot cflags
Commit 9a39e273d4df0560c724c5fe71f6314a0583ca2b removed the boot directory
addition to CFLAGS that was being used by the subdirectory builds. For the
other files, that patch set EXTRA_CFLAGS, but Makefile.build explicitly
sets that to empty as it is explicitly for a single directory only.
Append to KBUILD_CFLAGS instead.
Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
David Brownell notes that this causes a regression visible in the
drivers/usb/gadget Kconfig file:
"That Kconfig hasn't changed (other than adding new drivers), and it's
worked that way for several years now ... so the issue seems to be
changes in menuconfig/kconfig/etc semantics.
The issue is that when USB_GADGET=m, it's no longer possible to
configure peripheral controller drivers as modules ... the
controller drivers can now only be configured for static linkage.
It should be making a choice of one of the controller drivers which
could work on the target system, and allow that driver to be linked
either as a module (ok iff USB_GADGET=m) or statically."
Reverting this commit resolves the problem, and also fixes a second
problem that David noticed: various dependent options couldn't be enabled.
Tested-and-reported-by: David Brownell <david-b@pacbell.net> Cc: Randy Dunlap <rdunlap@xenotime.net> Cc: Jan Beulich <jbeulich@novell.com>, Cc: Andrew Morton <akpm@linux-foundation.org>, Cc: Sam Ravnborg <sam@ravnborg.org>, Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (74 commits)
fix do_sys_open() prototype
sysfs: trivial: fix sysfs_create_file kerneldoc spelling mistake
Documentation: Fix typo in SubmitChecklist.
Typo: depricated -> deprecated
Add missing profile=kvm option to Documentation/kernel-parameters.txt
fix typo about TBI in e1000 comment
proc.txt: Add /proc/stat field
small documentation fixes
Fix compiler warning in smount example program from sharedsubtree.txt
docs/sysfs: add missing word to sysfs attribute explanation
documentation/ext3: grammar fixes
Documentation/java.txt: typo and grammar fixes
Documentation/filesystems/vfs.txt: typo fix
include/asm-*/system.h: remove unused set_rmb(), set_wmb() macros
trivial copy_data_pages() tidy up
Fix typo in arch/x86/kernel/tsc_32.c
file link fix for Pegasus USB net driver help
remove unused return within void return function
Typo fixes retrun -> return
x86 hpet.h: remove broken links
...
Olof Johansson [Sat, 20 Oct 2007 02:04:20 +0000 (21:04 -0500)]
Fix build break in tsi108.c
Fix build break:
drivers/net/tsi108_eth.c: In function 'tsi108_init_one':
drivers/net/tsi108_eth.c:1633: error: expected ')' before 'dev'
drivers/net/tsi108_eth.c:1633: warning: too few arguments for format
make[2]: *** [drivers/net/tsi108_eth.o] Error 1
Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Randy Dunlap [Fri, 19 Oct 2007 04:53:50 +0000 (21:53 -0700)]
ir-functions.c:(.text+0xbce18): undefined reference to `input_event'
[bugme-daemon@bugzilla.kernel.org wrote:]
From: Randy Dunlap <randy.dunlap@oracle.com>
Drivers that use lro functions should depend on INET, otherwise they
may not link correctly. Let's not select INET. Select should be used
only for library-like code, not to enable subsystems.
Randy Dunlap [Fri, 19 Oct 2007 00:16:20 +0000 (17:16 -0700)]
NAPI: kconfig prompt and deleted doc file
- make the kconfig NAPI option prompt consistent across all net drivers
(other than EXPERIMENTAL; can it now be removed also, or is the new
napi_struct implementation now EXPERIMENTAL ?)
- remove comment about the now-deleted NAPI_HOWTO.txt file
- clean up typos in Tulip NAPI & Interrupt Mitigation
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Linus Torvalds [Sat, 20 Oct 2007 02:59:18 +0000 (19:59 -0700)]
Avoid compile error in fs/nfs/unlink.c
Erez Zadok reports that certain configurations fail to build due to
schedule() TASK_[UN]INTERRUPTIBLE not being declared. Add proper
include files to fix.
Jeff Garzik [Sat, 20 Oct 2007 02:56:44 +0000 (22:56 -0400)]
[libata] sata_sis: use correct S/G table size
sata_sis has the same restrictions as other SFF controllers, and so must
use LIBATA_MAX_PRD to denote that SCSI may only fill ATA_MAX_PRD/2
entries, due to our need to handle IOMMU merging.
sysctl: Don't compile sysctl_check when !CONFIG_SYSCTL
Weird I thought I had written the makefile so this would be handled. Oh
well this should fix it.
Sorry about that.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Acked-and-tested-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>