aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-10-21Merge branch 'for-next' of ↵Linus Torvalds16-649/+765
git://git.kernel.org/pub/scm/linux/kernel/git/hch/hfsplus * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/hfsplus: (29 commits) hfsplus: fix getxattr return value hfsplus: remove the unused hfsplus_kmap/hfsplus_kunmap helpers hfsplus: create correct initial catalog entries for device files hfsplus: remove superflous rootflags field in hfsplus_inode_info hfsplus: fix link corruption hfsplus: validate btree flags hfsplus: handle more on-disk corruptions without oopsing hfsplus: hfs_bnode_find() can fail, resulting in hfs_bnode_split() breakage hfsplus: fix oops on mount with corrupted btree extent records hfsplus: fix rename over directories hfsplus: convert tree_lock to mutex hfsplus: add missing extent locking in hfsplus_write_inode hfsplus: protect readdir against removals from open_dir_list hfsplus: use atomic bitops for the superblock flags hfsplus: add per-superblock lock for volume header updates hfsplus: remove the rsrc_inodes list hfsplus: do not cache and write next_alloc hfsplus: fix error handling in hfsplus_symlink hfsplus: merge mknod/mkdir/creat hfsplus: clean up hfsplus_write_inode ...
2010-10-21BKL: remove BKL from freevxfsArnd Bergmann2-22/+2
All uses of the BKL in freevxfs were the result of a pushdown into code that doesn't really need it. As Christoph points out, this is a read-only file system, which eliminates most of the races in readdir/lookup. Signed-off-by: Arnd Bergmann <[email protected]> Cc: Christoph Hellwig <[email protected]>
2010-10-21BKL: remove BKL from qnx4Arnd Bergmann3-21/+1
All uses of the BKL in qnx4 were the result of a pushdown into code that doesn't really need it. As Christoph points out, this is a read-only file system, which eliminates most of the races in readdir/lookup. Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Anders Larsen <[email protected]> Cc: Christoph Hellwig <[email protected]>
2010-10-21pcmcia: synclink_cs: fix information leak to userlandVasiliy Kulikov1-0/+2
Structure new_line is copied to userland with some padding fields unitialized. It leads to leaking of stack memory. Signed-off-by: Vasiliy Kulikov <[email protected]> CC: [email protected] Signed-off-by: Dominik Brodowski <[email protected]>
2010-10-21BKL: introduce CONFIG_BKL.Arnd Bergmann21-5/+36
With all the patches we have queued in the BKL removal tree, only a few dozen modules are left that actually rely on the BKL, and even there are lots of low-hanging fruit. We need to decide what to do about them, this patch illustrates one of the options: Every user of the BKL is marked as 'depends on BKL' in Kconfig, and the CONFIG_BKL becomes a user-visible option. If it gets disabled, no BKL using module can be built any more and the BKL code itself is compiled out. The one exception is file locking, which is practically always enabled and does a 'select BKL' instead. This effectively forces CONFIG_BKL to be enabled until we have solved the fs/lockd mess and can apply the patch that removes the BKL from fs/locks.c. Signed-off-by: Arnd Bergmann <[email protected]>
2010-10-21EDAC, MCE: Fix shift warning on 32-bitBorislav Petkov1-1/+1
Fix drivers/edac/mce_amd.c:262: warning: left shift count >= width of type on 32-bit builds. Reported-by: Randy Dunlap <[email protected]> Signed-off-by: Borislav Petkov <[email protected]>
2010-10-21EDAC, MCE: Add a BIT_64() macroBorislav Petkov1-0/+2
Add a macro for 64-bit vectors to use when accessing MSR contents. Signed-off-by: Borislav Petkov <[email protected]>
2010-10-21EDAC, MCE: Enable MCE decoding on F12hBorislav Petkov1-1/+1
Turn on MCE decoding on F12h. Signed-off-by: Borislav Petkov <[email protected]>
2010-10-21EDAC, MCE: Add F12h NB MCE decoderBorislav Petkov1-2/+3
F12h is completely covered by the generic path. Signed-off-by: Borislav Petkov <[email protected]>
2010-10-21EDAC, MCE: Add F12h IC MCE decoderBorislav Petkov1-0/+1
... which is the same as for K8 and F10h. Signed-off-by: Borislav Petkov <[email protected]>
2010-10-21EDAC, MCE: Add F12h DC MCE decoderBorislav Petkov1-7/+17
F12h DC MCE signatures are a subset of F10h's so reuse them. Signed-off-by: Borislav Petkov <[email protected]>
2010-10-21EDAC, MCE: Add support for F11h MCEsBorislav Petkov1-3/+12
F11h has almost the same MCE signatures as K8 except DRAM ECC and MC5 bank errors. Reuse functionality from the other families. Signed-off-by: Borislav Petkov <[email protected]>
2010-10-21EDAC, MCE: Enable MCE decoding on F14hBorislav Petkov1-4/+5
Now that all decoders have been taught about F14h, models < 0x10 MCEs, enable decoding on this family of CPUs. Also, issue a short informational message upon boot that MCE decoding gets enabled. Signed-off-by: Borislav Petkov <[email protected]>
2010-10-21EDAC, MCE: Fix FR MCEs decodingBorislav Petkov1-4/+10
Those are N/A on K8, so don't decode them there. Signed-off-by: Borislav Petkov <[email protected]>
2010-10-21EDAC, MCE: Complete NB MCE decodersBorislav Petkov3-56/+158
Add support for decoding F14h BU MCEs and improve decoding of the remaining families. Signed-off-by: Borislav Petkov <[email protected]>
2010-10-21EDAC, MCE: Warn about LS MCEs on F14hBorislav Petkov1-5/+13
F14h CPUs do not generate LS MCEs so exit early and warn the user in case this path is ever hit that something else might be going haywire. Signed-off-by: Borislav Petkov <[email protected]>
2010-10-21EDAC, MCE: Adjust IC decoders to F14hBorislav Petkov2-48/+71
Add support for IC MCEs for F14h CPUs. K8 and F10h are almost identical so use one function for both. Signed-off-by: Borislav Petkov <[email protected]>
2010-10-21EDAC, MCE: Adjust DC decoders to F14hBorislav Petkov2-27/+171
Add a per-family data cache decoders. Since there is a certain overlap between the different DC MCE signatures, reuse functionality between the families as far as possible. Signed-off-by: Borislav Petkov <[email protected]>
2010-10-21EDAC, MCE: Rename filesBorislav Petkov5-3/+4
Drop "edac_" string from the filenames since they're prefixed with edac/ in their pathname anyway. Signed-off-by: Borislav Petkov <[email protected]>
2010-10-21EDAC, MCE: Rework MCE injectionBorislav Petkov7-207/+203
Add sysfs injection facilities for testing of the MCE decoding code. Remove large parts of amd64_edac_dbg.c, as a result, which did only NB MCE injection anyway and the new injection code supports that functionality already. Add an injection module so that MCE decoding code in production kernels like those in RHEL and SLES can be tested. Signed-off-by: Borislav Petkov <[email protected]>
2010-10-21EDAC: Export edac sysfs class to users.Borislav Petkov7-95/+75
Move toplevel sysfs class to the stub and make it available to non-modularized code too. Add proper refcounting of its users and move the registration functionality into the reference counting routines. Signed-off-by: Borislav Petkov <[email protected]>
2010-10-21EDAC, MCE: Pass complete MCE info to decodersBorislav Petkov4-47/+56
... instead of the MCi_STATUS info only for improved handling of certain types of errors later. Signed-off-by: Borislav Petkov <[email protected]>
2010-10-21EDAC, MCE: Sanitize error codesBorislav Petkov2-49/+19
Clean up error codes names, shorten to mnemonics, add RRRR boundary checking. Signed-off-by: Borislav Petkov <[email protected]>
2010-10-21EDAC, MCE: Remove unused function parameterBorislav Petkov3-7/+4
Remove remains from previous functionality. Signed-off-by: Borislav Petkov <[email protected]>
2010-10-21EDAC, MCE: Add HW_ERR prefixBorislav Petkov1-17/+17
.. so that the user knows what she's looking at there in dmesg. Also, fix a minor cosmetic output inconsistency. Signed-off-by: Borislav Petkov <[email protected]>
2010-10-21EDAC: Fix error returnBorislav Petkov1-1/+1
We should return a negative value when we cannot get the toplevel edac sysfs class. Signed-off-by: Borislav Petkov <[email protected]>
2010-10-21x86-32, percpu: Correct the ordering of the percpu readmostly sectionH. Peter Anvin1-1/+1
Checkin c957ef2c59e952803766ddc22e89981ab534606f had inconsistent ordering of .data..percpu..page_aligned and .data..percpu..readmostly; the still-broken version affected x86-32 at least. The page aligned version really must be page aligned... Signed-off-by: H. Peter Anvin <[email protected]> LKML-Reference: <[email protected]> Cc: Shaohua Li <[email protected]> Cc: Eric Dumazet <[email protected]>
2010-10-21virtio_blk: remove BKL leftoversChristoph Hellwig1-15/+2
Remove the BKL usage added in "block: push down BKL into .locked_ioctl". Virtio-blk doesn't use the BKL for anything, and doesn't implement any ioctl command by itself, but only uses the generic scsi_cmd_ioctl which is fine without the BKL. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-10-21virtio: console: Disable lseek(2) for port file operationsAmit Shah1-0/+3
The ports are char devices; do not have seeking capabilities. Calling nonseekable_open() from the fops_open() call and setting the llseek fops pointer to no_llseek ensures an lseek() call from userspace returns -ESPIPE. Signed-off-by: Amit Shah <[email protected]> CC: Arnd Bergmann <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-10-21virtio: console: Send SIGIO in case of port unplugAmit Shah1-0/+3
If a port has registered for SIGIO signals, let the application know that the port is getting unplugged. Signed-off-by: Amit Shah <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-10-21virtio: console: Send SIGIO on new data arrival on portsAmit Shah1-0/+3
Send a SIGIO signal when new data arrives on a port. This is sent only when the process has requested for the signal to be sent using fcntl(). Signed-off-by: Amit Shah <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-10-21virtio: console: Send SIGIO to processes that request it for host eventsAmit Shah1-0/+25
A process can request for SIGIO on host connect / disconnect events using the O_ASYNC file flag using fcntl(). If that's requested, and if the guest-side connection for the port is open, any host-side open/close events for that port will raise a SIGIO. The process can then use poll() within the signal handler to find out which port triggered the signal. Signed-off-by: Amit Shah <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-10-21virtio: console: Reference counting portdev structs is not neededAmit Shah1-0/+8
Explain in a comment why there's no need to reference-count the portdev struct: when a device is yanked out, we can't do anything more with it anyway so just give up doing anything more with the data or the vqs and exit cleanly. Signed-off-by: Amit Shah <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-10-21virtio: console: Add reference counting for port structAmit Shah1-16/+64
When a port got hot-unplugged, when a port was open, any file operation after the unplugging resulted in a crash. This is fixed by ref-counting the port structure, and releasing it only when the file is closed. This splits the unplug operation in two parts: first marks the port as unavailable, removes all the buffers in the vqs and removes the port from the per-device list of ports. The second stage, invoked when all references drop to zero, releases the chardev and frees all other memory. Signed-off-by: Amit Shah <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-10-21virtio: console: Use cdev_alloc() instead of cdev_init()Amit Shah1-7/+13
This moves to using cdev on the heap instead of it being embedded in the ports struct. This helps individual refcounting and will allow us to properly remove cdev structs after hot-unplugs and close operations. Signed-off-by: Amit Shah <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-10-21virtio: console: Add a find_port_by_devt() functionAmit Shah1-1/+36
To convert to using cdev as a pointer to avoid kref troubles, we have to use a different method to get to a port from an inode than the current container_of method. Add find_port_by_devt() that looks up all portdevs and ports with those portdevs to find the right port. Signed-off-by: Amit Shah <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-10-21virtio: console: Add a list of portdevs that are activeAmit Shah1-0/+15
The virtio_console.c driver is capable of handling multiple devices at a time. Maintain a list of devices for future traversal. Signed-off-by: Amit Shah <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-10-21virtio: console: open: Use a common path for error handlingAmit Shah1-3/+9
Just re-arrange code for future patches. Signed-off-by: Amit Shah <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-10-21virtio: console: remove_port() should return voidAmit Shah1-2/+1
When a port is removed, we have to assume the port is gone. So a success/failure return value doesn't make sense. Signed-off-by: Amit Shah <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-10-21virtio: console: Make write() return -ENODEV on hot-unplugAmit Shah1-0/+3
When a port is hot-unplugged while an app was blocked on a write() call, the call was unblocked but would not get an error returned. Return -ENODEV to ensure the app knows the port has gone away. Signed-off-by: Amit Shah <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-10-21virtio: console: Make read() return -ENODEV on hot-unplugAmit Shah1-0/+3
When a port is hot-unplugged while an app was blocked on a read() call, the call was unblocked but would not get an error returned. Return -ENODEV to ensure the app knows the port has gone away. Signed-off-by: Amit Shah <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-10-21virtio: console: Unblock poll on port hot-unplugAmit Shah1-0/+4
When a port is hot-unplugged while an app is blocked on poll(), unblock the poll() and return. Signed-off-by: Amit Shah <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-10-21virtio: console: Un-block reads on chardev closeAmit Shah1-0/+4
If a chardev is closed, any blocked read / poll calls should just return and not attempt to use other state. Signed-off-by: Amit Shah <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-10-21virtio: console: Check if portdev is valid in send_control_msg()Amit Shah1-1/+4
A portdev may have been hot-unplugged while a port was open()ed. Skip sending control messages when the portdev isn't valid. Signed-off-by: Amit Shah <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-10-21virtio: console: Remove control vq data only if using multiport supportAmit Shah1-6/+9
If a portdev isn't using multiport support, it won't have any control vq data to remove. Signed-off-by: Amit Shah <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-10-21virtio: console: Reset vdev before removing deviceAmit Shah1-0/+3
The virtqueues should be disabled before attempting to remove the device. Signed-off-by: Amit Shah <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-10-21selinux: include vmalloc.h for vmalloc_userStephen Rothwell1-0/+1
Include vmalloc.h for vmalloc_user (fixes ppc build warning). Acked-by: Eric Paris <[email protected]> Signed-off-by: James Morris <[email protected]>
2010-10-21secmark: fix config problem when CONFIG_NF_CONNTRACK_SECMARK is not setEric Paris1-0/+2
When CONFIG_NF_CONNTRACK_SECMARK is not set we accidentally attempt to use the secmark fielf of struct nf_conn. Problem is when that config isn't set the field doesn't exist. whoops. Wrap the incorrect usage in the config. Signed-off-by: Eric Paris <[email protected]> Signed-off-by: James Morris <[email protected]>
2010-10-21selinux: implement mmap on /selinux/policyEric Paris2-1/+45
/selinux/policy allows a user to copy the policy back out of the kernel. This patch allows userspace to actually mmap that file and use it directly. Signed-off-by: Eric Paris <[email protected]> Signed-off-by: James Morris <[email protected]>
2010-10-21SELinux: allow userspace to read policy back out of the kernelEric Paris12-3/+1256
There is interest in being able to see what the actual policy is that was loaded into the kernel. The patch creates a new selinuxfs file /selinux/policy which can be read by userspace. The actual policy that is loaded into the kernel will be written back out to userspace. Signed-off-by: Eric Paris <[email protected]> Signed-off-by: James Morris <[email protected]>