aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-09-08KVM: x86 emulator: fix regression with cmpxchg8b on i386 hostsAvi Kivity2-6/+10
operand::val and operand::orig_val are 32-bit on i386, whereas cmpxchg8b operands are 64-bit. Fix by adding val64 and orig_val64 union members to struct operand, and using them where needed. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-09-08ipvs: fix active FTPJulian Anastasov4-12/+16
- Do not create expectation when forwarding the PORT command to avoid blocking the connection. The problem is that nf_conntrack_ftp.c:help() tries to create the same expectation later in POST_ROUTING and drops the packet with "dropping packet" message after failure in nf_ct_expect_related. - Change ip_vs_update_conntrack to alter the conntrack for related connections from real server. If we do not alter the reply in this direction the next packet from client sent to vport 20 comes as NEW connection. We alter it but may be some collision happens for both conntracks and the second conntrack gets destroyed immediately. The connection stucks too. Signed-off-by: Julian Anastasov <[email protected]> Signed-off-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-09-08gro: Re-fix different skb headroomsJarek Poplawski1-1/+1
The patch: "gro: fix different skb headrooms" in its part: "2) allocate a minimal skb for head of frag_list" is buggy. The copied skb has p->data set at the ip header at the moment, and skb_gro_offset is the length of ip + tcp headers. So, after the change the length of mac header is skipped. Later skb_set_mac_header() sets it into the NET_SKB_PAD area (if it's long enough) and ip header is misaligned at NET_SKB_PAD + NET_IP_ALIGN offset. There is no reason to assume the original skb was wrongly allocated, so let's copy it as it was. bugzilla : https://bugzilla.kernel.org/show_bug.cgi?id=16626 fixes commit: 3d3be4333fdf6faa080947b331a6a19bce1a4f57 Reported-by: Plamen Petrov <[email protected]> Signed-off-by: Jarek Poplawski <[email protected]> CC: Eric Dumazet <[email protected]> Acked-by: Eric Dumazet <[email protected]> Tested-by: Plamen Petrov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-09-08spi/dw_spi: clean the cs_control codeFeng Tang2-12/+7
commit 052dc7c45i "spi/dw_spi: conditional transfer mode change" introduced cs_control code, which has a bug by using bit offset for spi mode to set transfer mode in control register. Also it forces devices who don't need cs_control to re-configure the control registers for each spi transfer. This patch will fix them Signed-off-by: Feng Tang <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2010-09-08spi/dw_spi: Allow interrupt sharingYong Wang1-1/+6
Allow interrupt sharing since exclusive interrupt line for DW SPI controller is not provided on every platform. Signed-off-by: Yong Wang <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2010-09-08spi/spi_s3c64xx: Increase dead reckoning time in wait_for_xfer()Mark Brown1-1/+1
For small transfers at high speeds the expected transfer time can easily be well under 1ms, causing the delay in wait_for_xfer() to be only the dead reckoning fudge factor of 5ms currently included. Experiments on some of my systems shows that this is marginal for some transfers so double it to 10ms. Signed-off-by: Mark Brown <[email protected]> Acked-by: Jassi Brar <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2010-09-08spi/spi_s3c64xx: Move to subsys_initcall()Mark Brown1-1/+1
Allow the use of the S3C64xx SPI controller with things like PMICs by moving the init up to subsys_initcall(). Signed-off-by: Mark Brown <[email protected]> Acked-by: Jassi Brar <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2010-09-08ARM: Ensure PTE modifications via dma_alloc_coherent are visibleRussell King1-0/+2
Dave Hylands reports: | We've observed a problem with dma_alloc_writecombine when the system | is under heavy load (heavy bus traffic). We've managed to reduce the | problem to the following snippet, which is run from a kthread in a | continuous loop: | | void *virtAddr; | dma_addr_t physAddr; | unsigned int numBytes = 256; | | for (;;) { | virtAddr = dma_alloc_writecombine(NULL, | numBytes, &physAddr, GFP_KERNEL); | if (virtAddr == NULL) { | printk(KERN_ERR "Running out of memory\n"); | break; | } | | /* access DMA memory allocated */ | tmp = virtAddr; | *tmp = 0x77; | | /* free DMA memory */ | dma_free_writecombine(NULL, | numBytes, virtAddr, physAddr); | | ...sleep here... | } | | By itself, the code will run forever with no issues. However, as we | increase our bus traffic (typically using DMA) then the *tmp = 0x77 | line will eventually cause a page fault. If we add a small delay (a | few microseconds) before the *tmp = 0x77, then we don't see a page | fault, even under heavy load. A dsb() is required after modifying the PTE entries to ensure that they will always be visible. Add this dsb(). Reported-by: Dave Hylands <[email protected]> Tested-by: Dave Hylands <[email protected]> Signed-off-by: Russell King <[email protected]>
2010-09-08tracing/kprobe: Fix handling of C-unlike argument namesMasami Hiramatsu1-8/+12
Check the argument name whether it is invalid (not C-like symbol name). This makes event format simple. Reported-by: Srikar Dronamraju <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Mathieu Desnoyers <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Masami Hiramatsu <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2010-09-08tracing/kprobes: Fix handling of argument namesMasami Hiramatsu1-7/+10
Set "argN" name for each argument automatically if it has no specified name. Since dynamic trace event(kprobe_events) accepts special characters for its argument, its format can show those special characters (e.g. '$', '%', '+'). However, perf can't parse those format because of the character (especially '%') mess up the format. This sets "argX" name for those arguments if user omitted the argument names. E.g. # echo 'p do_fork %ax IP=%ip $stack' > tracing/kprobe_events # cat tracing/kprobe_events p:kprobes/p_do_fork_0 do_fork arg1=%ax IP=%ip arg3=$stack Reported-by: Srikar Dronamraju <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Mathieu Desnoyers <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Masami Hiramatsu <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2010-09-08perf probe: Fix handling of arguments namesMasami Hiramatsu1-13/+19
Don't make argument names from raw parameters (means the parameters are written in kprobe-tracer syntax), because the argument syntax may include special characters. Just leave it, then kprobe-tracer gives a new name. Reported-by: Srikar Dronamraju <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Frederic Weisbecker <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Masami Hiramatsu <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2010-09-08perf probe: Fix return probe supportMasami Hiramatsu2-0/+11
Fix a bug to support %return probe syntax again. Previous commit 4235b04 has a bug which disables the %return syntax on perf probe. Cc: Peter Zijlstra <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Frederic Weisbecker <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Masami Hiramatsu <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2010-09-08tracing/kprobe: Fix a memory leak in error caseMasami Hiramatsu1-3/+3
Fix a memory leak which happens when a field name conflicts with others. In error case, free_trace_probe() will free all arguments until nr_args, so this increments nr_args the begining of the loop instead of the end. Cc: Steven Rostedt <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Mathieu Desnoyers <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Masami Hiramatsu <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2010-09-08tracing: Do not allow llseek to set_ftrace_filterSteven Rostedt1-1/+1
Reading the file set_ftrace_filter does three things. 1) shows whether or not filters are set for the function tracer 2) shows what functions are set for the function tracer 3) shows what triggers are set on any functions 3 is independent from 1 and 2. The way this file currently works is that it is a state machine, and as you read it, it may change state. But this assumption breaks when you use lseek() on the file. The state machine gets out of sync and the t_show() may use the wrong pointer and cause a kernel oops. Luckily, this will only kill the app that does the lseek, but the app dies while holding a mutex. This prevents anyone else from using the set_ftrace_filter file (or any other function tracing file for that matter). A real fix for this is to rewrite the code, but that is too much for a -rc release or stable. This patch simply disables llseek on the set_ftrace_filter() file for now, and we can do the proper fix for the next major release. Reported-by: Robert Swiecki <[email protected]> Cc: Chris Wright <[email protected]> Cc: Tavis Ormandy <[email protected]> Cc: Eugene Teo <[email protected]> Cc: [email protected] Cc: <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
2010-09-08semaphore: Add DEFINE_SEMAPHOREThomas Gleixner1-0/+3
The full cleanup of init_MUTEX[_LOCKED] and DECLARE_MUTEX has not been done. Some of the users are real semaphores and we should name them as such instead of confusing everyone with "MUTEX". Provide the infrastructure to get finally rid of init_MUTEX[_LOCKED] and DECLARE_MUTEX. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Christoph Hellwig <[email protected]> LKML-Reference: <[email protected]>
2010-09-08ALSA: hda - Fix wrong HP pin detection in snd_hda_parse_pin_def_config()Takashi Iwai1-1/+1
snd_hda_parse_pin_def_config() has some workaround for re-assigning some pins declared as headphones to line-outs. This didn't work properly for some cases because it used memmove() stupidly wrongly. Reference: Novell bnc#637263 https://bugzilla.novell.com/show_bug.cgi?id=637263 Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2010-09-08ARM: 6359/1: ep93xx: move clock initialization earlierMika Westerberg1-1/+1
Commit 7cfe24947 ("ARM: AMBA: Add pclk support to AMBA bus infrastructure") changed AMBA bus to handle the PCLK automatically. However, in EP93xx clock initialization is arch_initcall which is done later than AMBA device identification. This causes amba_get_enable_pclk() to fail resulting device where UARTs are not functional. So change ep93xx_clock_init() to be postcore_initcall. Signed-off-by: Mika Westerberg <[email protected]> Acked-by: H Hartley Sweeten <[email protected]> Signed-off-by: Russell King <[email protected]>
2010-09-08Revert "[ARM] pxa: remove now unnecessary dma_needs_bounce()"Russell King2-8/+8
This reverts commit 4fa5518, which causes a compilation regression for IXP4xx platforms. Reported-by: Richard Cochran <[email protected]> Acked-by: Eric Miao <[email protected]> Signed-off-by: Russell King <[email protected]>
2010-09-08ALSA: seq/oss - Fix double-free at error path of snd_seq_oss_open()Takashi Iwai1-5/+4
The error handling in snd_seq_oss_open() has several bad codes that do dereferecing released pointers and double-free of kmalloc'ed data. The object dp is release in free_devinfo() that is called via private_free callback. The rest shouldn't touch this object any more. The patch changes delete_port() to call kfree() in any case, and gets rid of unnecessary calls of destructors in snd_seq_oss_open(). Fixes CVE-2010-3080. Reported-and-tested-by: Tavis Ormandy <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2010-09-08Revert "drm/i915: Warn if we run out of FIFO space for a mode"Chris Wilson1-7/+1
This reverts commit b9421ae8f30958deea98d71477b4a77a066856b4. This warning was so prelevant, even for apparently working machines, that it was just causing fear, anxiety and panic. The root cause still remains, so we will add some better debugging when we focus on fixing it. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=17021 Reported-by: Maciej Rutecki <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2010-09-08ALSA: msnd-classic: Fix invalid cfg parameterTakashi Iwai1-2/+6
The driver doesn't probe the device properly because of left-over cfg[] that isn't used at all for msnd-classic device. This is only for msnd- pinnacle. Signed-off-by: Takashi Iwai <[email protected]>
2010-09-08Revert "drm/i915: Allow LVDS on pipe A on gen4+"Chris Wilson1-2/+0
This reverts commit 0f3ee801b332d6ff22285386675fe5aaedf035c3. Enabling LVDS on pipe A was causing excessive wakeups on otherwise idle systems due to i915 interrupts. So restrict the LVDS to pipe B once more, whilst the issue is properly diagnosed. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=16307 Reported-and-tested-by: Enrico Bandiello <[email protected]> Poked-by: Florian Mickler <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Cc: Adam Jackson <[email protected]> Cc: [email protected]
2010-09-08ALSA: hda - Enable PC-beep for EeePC with ALC269 codecTakashi Iwai1-0/+1
EeePC 1001HAG has a similar problem like other ASUS machine, which doesn't set the codec SSID properly for indicating the beep capability. To enable PC-beep again, put this to the whitelist. Signed-off-by: Takashi Iwai <[email protected]>
2010-09-08ALSA: hda - Add errata initverb sequence for CS42xx codecsBrian Austin1-0/+50
Add init verb sequence for errata ER880C3 http://www.cirrus.com/en/pubs/errata/ER880C3.pdf Signed-off-by: Brian Austin <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2010-09-08ALSA: usb - Release capture substream URBs properlyTakashi Iwai1-1/+1
Due to the wrong "return" in the loop, a capture substream won't be released at disconnection properly if the device is capture only and has no playback substream. This caused Oops occasionally at the device reconnection. Reported-by: Kim Minhyoung <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2010-09-08ALSA: virtuoso: fix setting of Xonar DS line-in/mic-in controlsClemens Ladisch1-1/+20
The Line and Mic inputs cannot be used at the same time, so the driver has to automatically disable one of them if both are set. However, it forgot to notify userspace about this change, so the mixer state would be inconsistent. To fix this, check if the other control gets muted, and send a notification event in this case. Signed-off-by: Clemens Ladisch <[email protected]> Reported-and-tested-by: Nathan Schagen Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2010-09-08ALSA: virtuoso: work around missing reset in the Xonar DS Windows driverClemens Ladisch4-3/+21
For the WM8776 chip, this driver uses a different sample format and more features than the Windows driver. When rebooting from Linux into Windows, the latter driver does not reset the chip but assumes all its registers have their default settings, so we get garbled sound or, if the output happened to be muted before rebooting, no sound. To make that driver happy, hook our driver's cleanup function into the shutdown notifier and ensure that the chip gets reset. Signed-off-by: Clemens Ladisch <[email protected]> Reported-and-tested-by: Nathan Schagen Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2010-09-08ocfs2: Fix orphan add in ocfs2_create_inode_in_orphanMark Fasheh1-20/+107
ocfs2_create_inode_in_orphan() is used by reflink to create the newly reflinked inode simultaneously in the orphan dir. This allows us to easily handle partially-reflinked files during recovery cleanup. We have a problem though - the orphan dir stringifies inode # to determine a unique name under which the orphan entry dirent can be created. Since ocfs2_create_inode_in_orphan() needs the space allocated in the orphan dir before it can allocate the inode, we currently call into the orphan code: /* * We give the orphan dir the root blkno to fake an orphan name, * and allocate enough space for our insertion. */ status = ocfs2_prepare_orphan_dir(osb, &orphan_dir, osb->root_blkno, orphan_name, &orphan_insert); Using osb->root_blkno might work fine on unindexed directories, but the orphan dir can have an index. When it has that index, the above code fails to allocate the proper index entry. Later, when we try to remove the file from the orphan dir (using the actual inode #), the reflink operation will fail. To fix this, I created a function ocfs2_alloc_orphaned_file() which uses the newly split out orphan and inode alloc code to figure out what the inode block number will be (once allocated) and then prepare the orphan dir from that data. Signed-off-by: Mark Fasheh <[email protected]> Signed-off-by: Tao Ma <[email protected]>
2010-09-08ocfs2: split out ocfs2_prepare_orphan_dir() into locking and prep functionsMark Fasheh1-32/+88
We do this because ocfs2_create_inode_in_orphan() wants to order locking of the orphan dir with respect to locking of the inode allocator *before* making any changes to the directory. Signed-off-by: Mark Fasheh <[email protected]> Signed-off-by: Tao Ma <[email protected]>
2010-09-08ocfs2: allow return of new inode block location before allocation of the inodeMark Fasheh2-0/+180
This allows code which needs to know the eventual block number of an inode but can't allocate it yet due to transaction or lock ordering. For example, ocfs2_create_inode_in_orphan() currently gives a junk blkno for preparation of the orphan dir because it can't yet know where the actual inode is placed - that code is actually in ocfs2_mknod_locked. This is a problem when the orphan dirs are indexed as the junk inode number will create an index entry which goes unused (and fails the later removal from the orphan dir). Now with these interfaces, ocfs2_create_inode_in_orphan() can run the block group search (and get back the inode block number) *before* any actual allocation occurs. Signed-off-by: Mark Fasheh <[email protected]> Signed-off-by: Tao Ma <[email protected]>
2010-09-08ocfs2: use ocfs2_alloc_dinode_update_counts() instead of open codingMark Fasheh1-13/+4
ocfs2_search_chain() makes the same updates as ocfs2_alloc_dinode_update_counts to the alloc inode. Instead of open coding the bitmap update, use our helper function. Signed-off-by: Mark Fasheh <[email protected]> Signed-off-by: Tao Ma <[email protected]>
2010-09-08ocfs2: split out inode alloc code from ocfs2_mknod_lockedMark Fasheh1-18/+37
Do this by splitting the bulk of the function away from the inode allocation code at the very tom of ocfs2_mknod_locked(). Existing callers don't need to change and won't see any difference. The new function created, __ocfs2_mknod_locked() will be used shortly. Signed-off-by: Mark Fasheh <[email protected]> Signed-off-by: Tao Ma <[email protected]>
2010-09-08Ocfs2: Fix a regression bug from mainline ↵Tristan Ye1-1/+1
commit(6b933c8e6f1a2f3118082c455eef25f9b1ac7b45). The patch is to fix the regression bug brought from commit 6b933c8...( 'ocfs2: Avoid direct write if we fall back to buffered I/O'): http://oss.oracle.com/bugzilla/show_bug.cgi?id=1285 The commit 6b933c8e6f1a2f3118082c455eef25f9b1ac7b45 changed __generic_file_aio_write to generic_file_buffered_write, which didn't call filemap_{write,wait}_range to flush the pagecaches when we were falling O_DIRECT writes back to buffered ones. it did hurt the O_DIRECT semantics somehow in extented odirect writes. This patch tries to guarantee O_DIRECT writes of 'fall back to buffered' to be correctly flushed. Signed-off-by: Tristan Ye <[email protected]> Signed-off-by: Tao Ma <[email protected]>
2010-09-08ocfs2: Fix deadlock when allocating pageJan Kara3-4/+5
We cannot call grab_cache_page() when holding filesystem locks or with a transaction started as grab_cache_page() calls page allocation with GFP_KERNEL flag and thus page reclaim can recurse back into the filesystem causing deadlocks or various assertion failures. We have to use find_or_create_page() instead and pass it GFP_NOFS as we do with other allocations. Acked-by: Mark Fasheh <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Tao Ma <[email protected]>
2010-09-08ocfs2: properly set and use inode group alloc hintMark Fasheh1-4/+20
We were setting ac->ac_last_group in ocfs2_claim_suballoc_bits from res->sr_bg_blkno. Unfortunately, res->sr_bg_blkno is going to be zero under normal (non-fragmented) circumstances. The discontig block group patches effectively turned off that feature. Fix this by correctly calculating what the next group hint should be. Acked-by: Tao Ma <[email protected]> Signed-off-by: Mark Fasheh <[email protected]> Tested-by: Goldwyn Rodrigues <[email protected]> Signed-off-by: Tao Ma <[email protected]>
2010-09-08ocfs2: Use the right group in nfs sync check.Tao Ma1-8/+11
We have added discontig block group now, and now an inode can be allocated in an discontig block group. So get it in ocfs2_get_suballoc_slot_bit. The old ocfs2_test_suballoc_bit gets group block no from the allocation inode which is wrong. Fix it by passing the right group. Acked-by: Mark Fasheh <[email protected]> Signed-off-by: Tao Ma <[email protected]>
2010-09-08ocfs2: Flush drive's caches on fdatasyncJan Kara1-1/+10
When 'barrier' mount option is specified, we have to issue a cache flush during fdatasync(2). We have to do this even if inode doesn't have I_DIRTY_DATASYNC set because we still have to get written *data* to disk so that they are not lost in case of crash. Acked-by: Tao Ma <[email protected]> Signed-off-by: Jan Kara <[email protected]> Singed-off-by: Tao Ma <[email protected]>
2010-09-08ocfs2: make __ocfs2_page_mkwrite handle file end properly.Tao Ma1-3/+5
__ocfs2_page_mkwrite now is broken in handling file end. 1. the last page should be the page contains i_size - 1. 2. the len in the last page is also calculated wrong. So change them accordingly. Acked-by: Mark Fasheh <[email protected]> Signed-off-by: Tao Ma <[email protected]>
2010-09-08ocfs2: Fix incorrect checksum validation errorSunil Mushran1-1/+5
For local mounts, ocfs2_read_locked_inode() calls ocfs2_read_blocks_sync() to read the inode off the disk. The latter first checks to see if that block is cached in the journal, and, if so, returns that block. That is ok. But ocfs2_read_locked_inode() goes wrong when it tries to validate the checksum of such blocks. Blocks that are cached in the journal may not have had their checksum computed as yet. We should not validate the checksums of such blocks. Fixes ossbz#1282 http://oss.oracle.com/bugzilla/show_bug.cgi?id=1282 Signed-off-by: Sunil Mushran <[email protected]> Cc: [email protected] Singed-off-by: Tao Ma <[email protected]>
2010-09-08ocfs2: Fix metaecc error messagesSunil Mushran1-2/+2
Like tools, the checksum validate function now prints the values in hex. Signed-off-by: Sunil Mushran <[email protected]> Singed-off-by: Tao Ma <[email protected]>
2010-09-07Merge branch 'for-2.6.36' of git://linux-nfs.org/~bfields/linuxLinus Torvalds1-1/+1
* 'for-2.6.36' of git://linux-nfs.org/~bfields/linux: nfsd4: mask out non-access bits in nfs4_access_to_omode
2010-09-07Merge branch 'for-linus' of ↵Linus Torvalds9-45/+40
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: ima: always maintain counters AppArmor: Fix locking from removal of profile namespace AppArmor: Fix splitting an fqname into separate namespace and profile names AppArmor: Fix security_task_setrlimit logic for 2.6.36 changes AppArmor: Drop hack to remove appended " (deleted)" string
2010-09-08ima: always maintain countersMimi Zohar3-4/+9
commit 8262bb85da allocated the inode integrity struct (iint) before any inodes were created. Only after IMA was initialized in late_initcall were the counters updated. This patch updates the counters, whether or not IMA has been initialized, to resolve 'imbalance' messages. This patch fixes the bug as reported in bugzilla: 15673. When the i915 is builtin, the ring_buffer is initialized before IMA, causing the imbalance message on suspend. Reported-by: Thomas Meyer <[email protected]> Signed-off-by: Mimi Zohar <[email protected]> Tested-by: Thomas Meyer <[email protected]> Tested-by: David Safford<[email protected]> Cc: Stable Kernel <[email protected]> Signed-off-by: James Morris <[email protected]>
2010-09-08AppArmor: Fix locking from removal of profile namespaceJohn Johansen1-2/+4
The locking for profile namespace removal is wrong, when removing a profile namespace, it needs to be removed from its parent's list. Lock the parent of namespace list instead of the namespace being removed. Signed-off-by: John Johansen <[email protected]> Signed-off-by: James Morris <[email protected]>
2010-09-08AppArmor: Fix splitting an fqname into separate namespace and profile namesJohn Johansen1-1/+1
As per Dan Carpenter <[email protected]> If we have a ns name without a following profile then in the original code it did "*ns_name = &name[1];". "name" is NULL so "*ns_name" is 0x1. That isn't useful and could cause an oops when this function is called from aa_remove_profiles(). Beyond this the assignment of the namespace name was wrong in the case where the profile name was provided as it was being set to &name[1] after name = skip_spaces(split + 1); Move the ns_name assignment before updating name for the split and also add skip_spaces, making the interface more robust. Signed-off-by: John Johansen <[email protected]> Signed-off-by: James Morris <[email protected]>
2010-09-08AppArmor: Fix security_task_setrlimit logic for 2.6.36 changesJohn Johansen3-11/+15
2.6.36 introduced the abilitiy to specify the task that is having its rlimits set. Update mediation to ensure that confined tasks can only set their own group_leader as expected by current policy. Add TODO note about extending policy to support setting other tasks rlimits. Signed-off-by: John Johansen <[email protected]> Signed-off-by: James Morris <[email protected]>
2010-09-08AppArmor: Drop hack to remove appended " (deleted)" stringJohn Johansen1-27/+11
The 2.6.36 kernel has refactored __d_path() so that it no longer appends " (deleted)" to unlinked paths. So drop the hack that was used to detect and remove the appended string. Signed-off-by: John Johansen <[email protected]> Signed-off-by: James Morris <[email protected]>
2010-09-07Merge branch 'for-linus' of ↵Linus Torvalds24-291/+281
git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: PCI: bus speed strings should be const PCI hotplug: Fix build with CONFIG_ACPI unset PCI: PCIe: Remove the port driver module exit routine PCI: PCIe: Move PCIe PME code to the pcie directory PCI: PCIe: Disable PCIe port services during port initialization PCI: PCIe: Ask BIOS for control of all native services at once ACPI/PCI: Negotiate _OSC control bits before requesting them ACPI/PCI: Do not preserve _OSC control bits returned by a query ACPI/PCI: Make acpi_pci_query_osc() return control bits ACPI/PCI: Reorder checks in acpi_pci_osc_control_set() PCI: PCIe: Introduce commad line switch for disabling port services PCI: PCIe AER: Introduce pci_aer_available() x86/PCI: only define pci_domain_nr if PCI and PCI_DOMAINS are set PCI: provide stub pci_domain_nr function for !CONFIG_PCI configs
2010-09-07Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfsLinus Torvalds7-14/+35
* 'for-linus' of git://oss.sgi.com/xfs/xfs: xfs: Make fiemap work with sparse files xfs: prevent 32bit overflow in space reservation xfs: Disallow 32bit project quota id xfs: improve buffer cache hash scalability
2010-09-07Merge branch 'for-linus' of git://android.kernel.org/kernel/tegraLinus Torvalds1-0/+1
* 'for-linus' of git://android.kernel.org/kernel/tegra: [ARM] tegra: Add ZRELADDR default for ARCH_TEGRA