summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-05-22video: B2R2: Add support for YVU420/2_PACKED_(SEMI)_PLANAR.Maciej Socha
The new formats differ from their YUV counterparts only by the order of chroma samples. In YVU formats red chroma (V-component) comes before blue, whereas in YUV formats it is the other way around. ST-Ericsson ID: ER 325111 ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-10068 Change-Id: Ib7b2eb8bf36623a88fca87e34aacdff77c0df030 Signed-off-by: Maciej Socha <maciej.socha@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/18952 Reviewed-by: Robert LIND <robert.lind@stericsson.com> Reviewed-by: Magnus SMITH <magnus.xm.smith@stericsson.com> Reviewed-by: QATOOLS Reviewed-by: Robert FEKETE <robert.fekete@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2012-05-22B2R2: Correct output for combined scale and rotation.Maciej Socha
Corrects output on optimized path for scaling operations that use different horizontal and vertical scale factors and combine this with rotation. ST-Ericsson ID: ER 328924 ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-10068 Change-Id: I1c9e5154fc74141eb7f7f26450b748e21fdab7e1 Signed-off-by: Maciej Socha <maciej.socha@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/18607 Reviewed-by: Nils CALMSUND <nils.calmsund@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Reviewed-by: Robert FEKETE <robert.fekete@stericsson.com> Tested-by: Robert FEKETE <robert.fekete@stericsson.com>
2012-05-22video: av8100: Fix occurences of test patternMarcel Tunnissen
Fixes random occurences of test pattern for SDTV through AV8100, caused by uninitialized memory. ST-Ericsson ID: ER 329441 Linux-next: ST-Ericsson ID: ER 282779 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Idfed6bb2d4418345488c54ead4b19e30e9dc653e Signed-off-by: Marcel Tunnissen <Marcel.Tuennissen@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/18563 Tested-by: Marcel TUNNISSEN <marcel.tuennissen@stericsson.com> Reviewed-by: Jimmy RUBIN <jimmy.rubin@stericsson.com> Reviewed-by: Dan JOHANSSON <dan.johansson@stericsson.com> Reviewed-by: Per PERSSON <per.xb.persson@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2012-05-22video: mcde: Remove special SDTV watermark levelMarcel Tunnissen
This will remove the special setting for the watermark level in MCDE for SDTV out through AV8100. As a consequence MCDE setup is independent of AV8100 running SDTV or HDMI. ST-Ericsson ID: AP 329318 Linux-next: ST-Ericsson ID: ER 282779 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I65e80303a76c9a7887611fea8284cb4598b37c83 Signed-off-by: Marcel Tunnissen <Marcel.Tuennissen@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/18526 Reviewed-by: Jimmy RUBIN <jimmy.rubin@stericsson.com> Reviewed-by: Per PERSSON <per.xb.persson@stericsson.com> Tested-by: Marcel TUNNISSEN <marcel.tuennissen@stericsson.com> Reviewed-by: Dan JOHANSSON <dan.johansson@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2012-05-22video: HWMEM: Make user space include linux/types.hPhilippe Langlais
__x32 are defined in linux/types.h which is therefore needed in user space also. This patch also adds the uncached flag when allocating the FB to ensure we don't get a cached FB. Depends-On: I9a45ad54a0cc8a5cdb1e3b9038ad50aeacb3f9c3 ST-Ericsson ID: AP 327001 ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-10068 Change-Id: I3df94e161be96dd2f55928daab3eb20837b92c1d Signed-off-by: Johan Mossberg <johan.xx.mossberg@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/18551 Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2012-05-22B2R2: Remove bluish tone when using yuv422iRobert Fekete
Correction of format checked for in bool is_yvu_fmt. ST-Ericsson ID: ER 328908 ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-10068 Change-Id: I0df2df5ae2226b4828271b9e543c5fd70338a2ca Signed-off-by: Robert Fekete <robert.fekete@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/18474 Reviewed-by: Maciej SOCHA <maciej.socha@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2012-05-22ux500: mcde: Remove unused filePhilippe Langlais
Removes mcde.c from ux500 directory ST-Ericsson ID: AP326432 Change-Id: I6cf4634bbd1d86bc18a10fc431ccaf8d0798a41d Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/17782 Reviewed-by: Dan JOHANSSON <dan.johansson@stericsson.com> Tested-by: Jimmy RUBIN <jimmy.rubin@stericsson.com> Conflicts: arch/arm/mach-ux500/mcde.c
2012-05-22video: HWMEM Update APIPhilippe Langlais
Perform queued hwmem API changes. One commit to ease dependency handling. Depends-On: I13f249cf5f51f9f138171e8d6f59e1d5d2f72de1, I31030bcfda7cf76d15402c2137576da4f3fb2761, I2dc7e6aa5686492550b5164e50c06ed750ac9e16, Ia12bbb9f378c331cfb9b1376dedb3b7b65f56429, Ibc3404df4876971d8b69272c63120e2fe3bb2787 ST-Ericsson ID: AP 327001 ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-10068 Change-Id: I9a45ad54a0cc8a5cdb1e3b9038ad50aeacb3f9c3 Signed-off-by: Johan Mossberg <johan.xx.mossberg@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/17518 Reviewed-by: Robert FEKETE <robert.fekete@stericsson.com>
2012-05-22b2r2: Warnings fixPhilippe Langlais
Signed-off-by: Philippe Langlais <philippe.langlais@linaro.org>
2012-05-22Adding b2r2_blt_main.c to finish porting b2r2 portion of the video driver ↵Mathieu J. Poirier
from .35 to .38 Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2012-05-22Porting b2r2 portion of video driver from .35 to .38Philippe Langlais
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2012-05-22video: mcde: Fix field swap for CVBS by AV8100Marcel Tunnissen
Fixes the problem that the interlaced fields are swapped sometimes after configuring CVBS out through AV8100. ST-Ericsson ID: ER 323997 Linux-next: ST-Ericsson ID: ER 282779 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I1ff10612f05fce1cdd1d991b50513a93153730e4 Signed-off-by: Marcel Tunnissen <Marcel.Tuennissen@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/18327 Tested-by: Marcel TUNNISSEN <marcel.tuennissen@stericsson.com> Reviewed-by: Jimmy RUBIN <jimmy.rubin@stericsson.com> Reviewed-by: Dan JOHANSSON <dan.johansson@stericsson.com> Reviewed-by: Per PERSSON <per.xb.persson@stericsson.com>
2012-05-22video: mcde: add support to change av8100 portMarcel Tunnissen
Adds support for changing the input pixel format of AV8100 dynamically. ST-Ericsson ID: AP 322393 Linux-next: ST-Ericsson ID: ER 282779 ST-Ericsson FOSS-OUT ID: Trivial Depends-On: Ie7a821b8d3965aa65384b4393e3083ef406c8282 Change-Id: I026697638bcf87aff5b54346a80a3fcfb9073ae9 Signed-off-by: Marcel Tunnissen <Marcel.Tuennissen@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/17937 Reviewed-by: Dan JOHANSSON <dan.johansson@stericsson.com> Tested-by: Marcel TUNNISSEN <marcel.tuennissen@stericsson.com>
2012-05-22video: mcde: Add missing line for CVBS TV outMarcel Tunnissen
Fixes that one line is missing for the AB8500 MCDE display. ST-Ericsson ID: ER 326380 Linux-next: ST-Ericsson ID: ER 282779 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Icd88391d8e96c5789f142ddaedcbce202f2c5347 Signed-off-by: Marcel Tunnissen <Marcel.Tuennissen@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/18040 Tested-by: Marcel TUNNISSEN <marcel.tuennissen@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2012-05-22drivers: video: add regulator for CVBS outPhilippe Langlais
- Adds a regulator that is used for CVBS TV out by AB8500 DENC and AV8100 DENC. The regulator is for the switch at the AV connector that switches between video out and mic in. ST-Ericsson ID: AP 322391 Linux-next: ST-Ericsson ID: ER 282779 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Ie7a821b8d3965aa65384b4393e3083ef406c8282 Signed-off-by: Marcel Tunnissen <Marcel.Tuennissen@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/16819 Tested-by: Marcel TUNNISSEN <marcel.tuennissen@stericsson.com> Reviewed-by: Per PERSSON <per.xb.persson@stericsson.com> Reviewed-by: Robert FEKETE <robert.fekete@stericsson.com> Conflicts: arch/arm/mach-ux500/board-mop500-regulators.c arch/arm/mach-ux500/board-pdp-mcde.c Conflicts: arch/arm/mach-ux500/board-mop500-regulators.c drivers/mfd/ab8500-denc.c
2012-05-22video: mcde: Correct behaviour for 720x480 resolutionPer Persson
Add an extra dsi_delay0 when 720x480. ST-Ericsson ID: ER 327665 Change-Id: Ic6de688b52c9df69f91efdd2b0c5b1d17b6e0621 Signed-off-by: Per Persson <per.xb.persson@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/18102 Reviewed-by: Dan JOHANSSON <dan.johansson@stericsson.com>
2012-05-22video: av8100: Request inputclk only if inputclk_id is valid.Per Persson
ST-Ericsson ID: ER 327932 Change-Id: Idf50a3de8b686ab23fcb88f4d556f0f2e01c0558 Signed-off-by: Per Persson <per.xb.persson@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/17971 Reviewed-by: Jimmy RUBIN <jimmy.rubin@stericsson.com> Reviewed-by: Dan JOHANSSON <dan.johansson@stericsson.com>
2012-05-22video: mcde: Fix memory allocation failurePer Persson
Use hwmem_kmap instead of ioremap. ST-Ericsson ID: ER 324769, AP 325234 Change-Id: Iab7cfc16c53cc4628d75024e579e7b430bbdf93d Signed-off-by: Per Persson <per.xb.persson@stericsson.com>
2012-05-22video: mcde: Fix for overlay handlingJimmy Rubin
Changes handling of channel and overlay registers in enable_mcde_hw. Changes how overlays are disabled. ST-Ericsson ID: ER323826 Change-Id: I376da1e3c7af2f24e694343828b1d6bffdf2f0c8 Signed-off-by: Jimmy Rubin <jimmy.rubin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/15212 Reviewed-by: Per PERSSON <per.xb.persson@stericsson.com> Reviewed-by: Dan JOHANSSON <dan.johansson@stericsson.com>
2012-05-22video: mcde: Fix mcde GPIO and device creationPhilippe Langlais
Fix so that the GPIO is defined in the right place. Fix so only one device is created when both the u5500 and u8500 is defined. Signed-off-by: Robert Marklund <robert.marklund@stericsson.com>
2012-05-22video: mcde: Fix Kconfig to match the ux500 updatePhilippe Langlais
Change the dependencies of MCDE Kconfigs to match the mach-ux500 update. Change name of the regulators used by the mcde driver to match the mach-ux500 update. Added the EGPIO used by mcde. Signed-off-by: Robert Marklund <robert.marklund@stericsson.com>
2012-05-22mcde: mach-ux500: u5500 alignment with 2.6.35Philippe Langlais
2012-05-22mcde: mach-ux500: boards merge from GLK 2.6.35Philippe Langlais
Signed-off-by: Philippe Langlais <philippe.langlais@stericsson.com>
2012-05-22Moving from ioctl to unlocked_ioctl in av8100Mathieu J. Poirier
av8100.c: Simply re-using av8100_ioctl() hdmi.c: Following other drivers conversion to unlocked_ioctl Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2012-05-22Porting mcde portion of the video driver from .35 to .38Mathieu J. Poirier
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2012-05-22Porting av8100 portion of video driver from .35 to .38Mathieu J. Poirier
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2012-05-22Porting architecture portion of av8100 driver from .35 to .38Philippe Langlais
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2012-05-20Linux 3.4v3.4Linus Torvalds
2012-05-19Merge tag 'parisc-fixes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6 Pull PA-RISC fixes from James Bottomley: "This is a set of three bug fixes that gets parisc running again on systems with PA1.1 processors. Two fix regressions introduced in 2.6.39 and one fixes a prefetch bug that only affects PA7300LC processors. We also have another pending fix to do with the sectional arrangement of vmlinux.lds, but there's a query on it during testing on one particular system type, so I'll hold off sending it in for now." * tag 'parisc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6: [PARISC] fix panic on prefetch(NULL) on PA7300LC [PARISC] fix crash in flush_icache_page_asm on PA1.1 [PARISC] fix PA1.1 oops on boot
2012-05-19Merge branch 'x86/ld-fix' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 linker bug workarounds from Peter Anvin. GNU ld-2.22.52.0.[12] (*) has an unfortunate bug where it incorrectly turns certain relocation entries absolute. Section-relative symbols that are part of otherwise empty sections are silently changed them to absolute. We rely on section-relative symbols staying section-relative, and actually have several sections in the linker script solely for this purpose. See for example http://sourceware.org/bugzilla/show_bug.cgi?id=14052 We could just black-list the buggy linker, but it appears that it got shipped in at least F17, and possibly other distros too, so it's sadly not some rare unusual case. This backports the workaround from the x86/trampoline branch, and as Peter says: "This is not a minimal fix, not at all, but it is a tested code base." * 'x86/ld-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86, relocs: When printing an error, say relative or absolute x86, relocs: Workaround for binutils 2.22.52.0.1 section bug x86, realmode: 16-bit real-mode code support for relocs tool (*) That's a manly release numbering system. Stupid, sure. But manly.
2012-05-19Merge branch 'for-linus' of git://git.kernel.dk/linux-blockLinus Torvalds
Pull block layer fixes from Jens Axboe: "A few small, but important fixes. Most of them are marked for stable as well - Fix failure to release a semaphore on error path in mtip32xx. - Fix crashable condition in bio_get_nr_vecs(). - Don't mark end-of-disk buffers as mapped, limit it to i_size. - Fix for build problem with CONFIG_BLOCK=n on arm at least. - Fix for a buffer overlow on UUID partition printing. - Trivial removal of unused variables in dac960." * 'for-linus' of git://git.kernel.dk/linux-block: block: fix buffer overflow when printing partition UUIDs Fix blkdev.h build errors when BLOCK=n bio allocation failure due to bio_get_nr_vecs() block: don't mark buffers beyond end of disk as mapped mtip32xx: release the semaphore on an error path dac960: Remove unused variables from DAC960_CreateProcEntries()
2012-05-19Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds
Pull one more networking bug-fix from David Miller: "One last straggler. Eric Dumazet's pktgen unload oops fix was not entirely complete, but all the cases should be handled properly now.... fingers crossed." * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: pktgen: fix module unload for good
2012-05-19memcg,thp: fix res_counter:96 regressionHugh Dickins
Occasionally, testing memcg's move_charge_at_immigrate on rc7 shows a flurry of hundreds of warnings at kernel/res_counter.c:96, where res_counter_uncharge_locked() does WARN_ON(counter->usage < val). The first trace of each flurry implicates __mem_cgroup_cancel_charge() of mc.precharge, and an audit of mc.precharge handling points to mem_cgroup_move_charge_pte_range()'s THP handling in commit 12724850e806 ("memcg: avoid THP split in task migration"). Checking !mc.precharge is good everywhere else, when a single page is to be charged; but here the "mc.precharge -= HPAGE_PMD_NR" likely to follow, is liable to result in underflow (a lot can change since the precharge was estimated). Simply check against HPAGE_PMD_NR: there's probably a better alternative, trying precharge for more, splitting if unsuccessful; but this one-liner is safer for now - no kernel/res_counter.c:96 warnings seen in 26 hours. Signed-off-by: Hugh Dickins <hughd@google.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-18x86, relocs: When printing an error, say relative or absoluteH. Peter Anvin
When the relocs tool throws an error, let the error message say if it is an absolute or relative symbol. This should make it a lot more clear what action the programmer needs to take and should help us find the reason if additional symbol bugs show up. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Cc: <stable@vger.kernel.org>
2012-05-18x86, relocs: Workaround for binutils 2.22.52.0.1 section bugH. Peter Anvin
GNU ld 2.22.52.0.1 has a bug that it blindly changes symbols from section-relative to absolute if they are in a section of zero length. This turns the symbols __init_begin and __init_end into absolute symbols. Let the relocs program know that those should be treated as relative symbols. Reported-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: H. Peter Anvin <hpa@zytor.com> Cc: H.J. Lu <hjl.tools@gmail.com> Cc: <stable@vger.kernel.org> Cc: Jarkko Sakkinen <jarkko.sakkinen@intel.com>
2012-05-18x86, realmode: 16-bit real-mode code support for relocs toolH. Peter Anvin
A new option is added to the relocs tool called '--realmode'. This option causes the generation of 16-bit segment relocations and 32-bit linear relocations for the real-mode code. When the real-mode code is moved to the low-memory during kernel initialization, these relocation entries can be used to relocate the code properly. In the assembly code 16-bit segment relocations must be relative to the 'real_mode_seg' absolute symbol. Linear relocations must be relative to a symbol prefixed with 'pa_'. 16-bit segment relocation is used to load cs:ip in 16-bit code. Linear relocations are used in the 32-bit code for relocatable data references. They are declared in the linker script of the real-mode code. The relocs tool is moved to arch/x86/tools/relocs.c, and added new target archscripts that can be used to build scripts needed building an architecture. be compiled before building the arch/x86 tree. [ hpa: accelerating this because it detects invalid absolute relocations, a serious bug in binutils 2.22.52.0.x which currently produces bad kernels. ] Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Link: http://lkml.kernel.org/r/1336501366-28617-2-git-send-email-jarkko.sakkinen@intel.com Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@intel.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Cc: <stable@vger.kernel.org>
2012-05-18Merge tag 'dm-3.4-fixes-2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm Pull a dm fix from Alasdair G Kergon: "A fix to the thin provisioning userspace interface." * tag 'dm-3.4-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm: dm thin: fix table output when pool target disables discard passdown internally
2012-05-19dm thin: fix table output when pool target disables discard passdown internallyMike Snitzer
When the thin pool target clears the discard_passdown parameter internally, it incorrectly changes the table line reported to userspace. This breaks dumb string comparisons on these table lines in generic userspace device-mapper library code and leads to tables being reloaded repeatedly when nothing is actually meant to be changing. This patch corrects this by no longer changing the table line when discard passdown was disabled. We can still tell when discard passdown is overridden by looking for the message "Discard unsupported by data device (sdX): Disabling discard passdown." This automatic detection is also moved from the 'load' to the 'resume' so that it is re-evaluated should the properties of underlying devices change. Signed-off-by: Mike Snitzer <snitzer@redhat.com> Acked-by: Joe Thornber <ejt@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2012-05-18Merge tag 'md-3.4-fixes' of git://neil.brown.name/mdLinus Torvalds
Pull one more md bugfix from NeilBrown: "Fix bug in recent fix to RAID10. Without this patch, recovery will crash" * tag 'md-3.4-fixes' of git://neil.brown.name/md: md/raid10: fix transcription error in calc_sectors conversion.
2012-05-18Merge branch 'stable' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile Pull tile tree bugfix from Chris Metcalf: "This fixes a security vulnerability (and correctness bug) in tilegx" * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: tilegx: enable SYSCALL_WRAPPERS support
2012-05-19md/raid10: fix transcription error in calc_sectors conversion.NeilBrown
The old code was sector_div(stride, fc); the new code was sector_dir(size, conf->near_copies); 'size' is right (the stride various wasn't really needed), but 'fc' means 'far_copies', and that is an important difference. Signed-off-by: NeilBrown <neilb@suse.de>
2012-05-18Merge branch 'akpm' (Andrew's patch-bomb)Linus Torvalds
Merge misc fixes from Andrew Morton. * emailed from Andrew Morton <akpm@linux-foundation.org>: (4 patches) frv: delete incorrect task prototypes causing compile fail slub: missing test for partial pages flush work in flush_all() fs, proc: fix ABBA deadlock in case of execution attempt of map_files/ entries drivers/rtc/rtc-pl031.c: configure correct wday for 2000-01-01
2012-05-18proc: move fd symlink i_mode calculations into tid_fd_revalidate()Linus Torvalds
Instead of doing the i_mode calculations at proc_fd_instantiate() time, move them into tid_fd_revalidate(), which is where the other inode state (notably uid/gid information) is updated too. Otherwise we'll end up with stale i_mode information if an fd is re-used while the dentry still hangs around. Not that anything really *cares* (symlink permissions don't really matter), but Tetsuo Handa noticed that the owner read/write bits don't always match the state of the readability of the file descriptor, and we _used_ to get this right a long time ago in a galaxy far, far away. Besides, aside from fixing an ugly detail (that has apparently been this way since commit 61a28784028e: "proc: Remove the hard coded inode numbers" in 2006), this removes more lines of code than it adds. And it just makes sense to update i_mode in the same place we update i_uid/gid. Al Viro correctly points out that we could just do the inode fill in the inode iops ->getattr() function instead. However, that does require somewhat slightly more invasive changes, and adds yet *another* lookup of the file descriptor. We need to do the revalidate() for other reasons anyway, and have the file descriptor handy, so we might as well fill in the information at this point. Reported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> Cc: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Eric Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-18pktgen: fix module unload for goodEric Dumazet
commit c57b5468406 (pktgen: fix crash at module unload) did a very poor job with list primitives. 1) list_splice() arguments were in the wrong order 2) list_splice(list, head) has undefined behavior if head is not initialized. 3) We should use the list_splice_init() variant to clear pktgen_threads list. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-18tilegx: enable SYSCALL_WRAPPERS supportChris Metcalf
Some discussion with the glibc mailing lists revealed that this was necessary for 64-bit platforms with MIPS-like sign-extension rules for 32-bit values. The original symptom was that passing (uid_t)-1 to setreuid() was failing in programs linked -pthread because of the "setxid" mechanism for passing setxid-type function arguments to the syscall code. SYSCALL_WRAPPERS handles ensuring that all syscall arguments end up with proper sign-extension and is thus the appropriate fix for this problem. On other platforms (s390, powerpc, sparc64, and mips) this was fixed in 2.6.28.6. The general issue is tracked as CVE-2009-0029. Cc: <stable@vger.kernel.org> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2012-05-18Merge tag 'linus-mce-fix' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull a machine check recovery fix from Tony Luck. I really don't like how the MCE code does some of the things it does, but this does seem to be an improvement. * tag 'linus-mce-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: x86/mce: Only restart instruction after machine check recovery if it is safe
2012-05-17frv: delete incorrect task prototypes causing compile failPaul Gortmaker
Commit 41101809a865 ("fork: Provide weak arch_release_[task_struct| thread_info] functions") in -tip highlights a problem in the frv arch, where it has needles prototypes for alloc_task_struct_node and free_task_struct. This now shows up as: kernel/fork.c:120:66: error: static declaration of 'alloc_task_struct_node' follows non-static declaration kernel/fork.c:127:51: error: static declaration of 'free_task_struct' follows non-static declaration since that commit turned them into real functions. Since arch/frv does does not define define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR (i.e. it just uses the generic ones) it shouldn't list these at all. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: David Howells <dhowells@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-17slub: missing test for partial pages flush work in flush_all()majianpeng
I found some kernel messages such as: SLUB raid5-md127: kmem_cache_destroy called for cache that still has objects. Pid: 6143, comm: mdadm Tainted: G O 3.4.0-rc6+ #75 Call Trace: kmem_cache_destroy+0x328/0x400 free_conf+0x2d/0xf0 [raid456] stop+0x41/0x60 [raid456] md_stop+0x1a/0x60 [md_mod] do_md_stop+0x74/0x470 [md_mod] md_ioctl+0xff/0x11f0 [md_mod] blkdev_ioctl+0xd8/0x7a0 block_ioctl+0x3b/0x40 do_vfs_ioctl+0x96/0x560 sys_ioctl+0x91/0xa0 system_call_fastpath+0x16/0x1b Then using kmemleak I found these messages: unreferenced object 0xffff8800b6db7380 (size 112): comm "mdadm", pid 5783, jiffies 4294810749 (age 90.589s) hex dump (first 32 bytes): 01 01 db b6 ad 4e ad de ff ff ff ff ff ff ff ff .....N.......... ff ff ff ff ff ff ff ff 98 40 4a 82 ff ff ff ff .........@J..... backtrace: kmemleak_alloc+0x21/0x50 kmem_cache_alloc+0xeb/0x1b0 kmem_cache_open+0x2f1/0x430 kmem_cache_create+0x158/0x320 setup_conf+0x649/0x770 [raid456] run+0x68b/0x840 [raid456] md_run+0x529/0x940 [md_mod] do_md_run+0x18/0xc0 [md_mod] md_ioctl+0xba8/0x11f0 [md_mod] blkdev_ioctl+0xd8/0x7a0 block_ioctl+0x3b/0x40 do_vfs_ioctl+0x96/0x560 sys_ioctl+0x91/0xa0 system_call_fastpath+0x16/0x1b This bug was introduced by commit a8364d5555b ("slub: only IPI CPUs that have per cpu obj to flush"), which did not include checks for per cpu partial pages being present on a cpu. Signed-off-by: majianpeng <majianpeng@gmail.com> Cc: Gilad Ben-Yossef <gilad@benyossef.com> Acked-by: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Tested-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-17fs, proc: fix ABBA deadlock in case of execution attempt of map_files/ entriesCyrill Gorcunov
map_files/ entries are never supposed to be executed, still curious minds might try to run them, which leads to the following deadlock ====================================================== [ INFO: possible circular locking dependency detected ] 3.4.0-rc4-24406-g841e6a6 #121 Not tainted ------------------------------------------------------- bash/1556 is trying to acquire lock: (&sb->s_type->i_mutex_key#8){+.+.+.}, at: do_lookup+0x267/0x2b1 but task is already holding lock: (&sig->cred_guard_mutex){+.+.+.}, at: prepare_bprm_creds+0x2d/0x69 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&sig->cred_guard_mutex){+.+.+.}: validate_chain+0x444/0x4f4 __lock_acquire+0x387/0x3f8 lock_acquire+0x12b/0x158 __mutex_lock_common+0x56/0x3a9 mutex_lock_killable_nested+0x40/0x45 lock_trace+0x24/0x59 proc_map_files_lookup+0x5a/0x165 __lookup_hash+0x52/0x73 do_lookup+0x276/0x2b1 walk_component+0x3d/0x114 do_last+0xfc/0x540 path_openat+0xd3/0x306 do_filp_open+0x3d/0x89 do_sys_open+0x74/0x106 sys_open+0x21/0x23 tracesys+0xdd/0xe2 -> #0 (&sb->s_type->i_mutex_key#8){+.+.+.}: check_prev_add+0x6a/0x1ef validate_chain+0x444/0x4f4 __lock_acquire+0x387/0x3f8 lock_acquire+0x12b/0x158 __mutex_lock_common+0x56/0x3a9 mutex_lock_nested+0x40/0x45 do_lookup+0x267/0x2b1 walk_component+0x3d/0x114 link_path_walk+0x1f9/0x48f path_openat+0xb6/0x306 do_filp_open+0x3d/0x89 open_exec+0x25/0xa0 do_execve_common+0xea/0x2f9 do_execve+0x43/0x45 sys_execve+0x43/0x5a stub_execve+0x6c/0xc0 This is because prepare_bprm_creds grabs task->signal->cred_guard_mutex and when do_lookup happens we try to grab task->signal->cred_guard_mutex again in lock_trace. Fix it using plain ptrace_may_access() helper in proc_map_files_lookup() and in proc_map_files_readdir() instead of lock_trace(), the caller must be CAP_SYS_ADMIN granted anyway. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Reported-by: Sasha Levin <levinsasha928@gmail.com> Cc: Konstantin Khlebnikov <khlebnikov@openvz.org> Cc: Pavel Emelyanov <xemul@openvz.org> Cc: Dave Jones <davej@redhat.com> Cc: Vasiliy Kulikov <segoon@openwall.com> Cc: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-17drivers/rtc/rtc-pl031.c: configure correct wday for 2000-01-01Rajkumar Kasirajan
The reset date of the ST Micro version of PL031 is 2000-01-01. The correct weekday for 2000-01-01 is saturday, but pl031 is initialized to sunday. This may lead to alarm malfunction, so configure the correct wday if RTC_DR indicates reset. Signed-off-by: Rajkumar Kasirajan <rajkumar.kasirajan@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Cc: Mattias Wallin <mattias.wallin@stericsson.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>