aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-08-01kgdb: fix gdb serial thread queriesJason Wessel
The command "info threads" did not work correctly with kgdb. It would result in a silent kernel hang if used. This patach addresses several problems. - Fix use of deprecated NR_CPUS - Fix kgdb to not walk linearly through the pid space - Correctly implement shadow pids - Change the threads per query to a #define - Fix kgdb_hex2long to work with negated values The threads 0 and -1 are reserved to represent the current task. That means that CPU 0 will start with a shadow thread id of -2, and CPU 1 will have a shadow thread id of -3, etc... From the debugger you can switch to a shadow thread to see what one of the other cpus was doing, however it is not possible to execute run control operations on any other cpu execept the cpu executing the kgdb_handle_exception(). Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
2008-08-01kgdb: fix kgdb_validate_break_address to perform a mem writeJason Wessel
A regression to the kgdb core was found in the case of using the CONFIG_DEBUG_RODATA kernel option. When this option is on, a breakpoint cannot be written into any readonly memory page. When an external debugger requests a breakpoint to get set, the kgdb_validate_break_address() was only checking to see if the address to place the breakpoint was readable and lacked a write check. This patch changes the validate routine to try reading (via the breakpoint set request) and also to try immediately writing the break point. If either fails, an error is correctly returned and the debugger behaves correctly. Then an end user can make the descision to use hardware breakpoints. Also update the documentation to reflect that using CONFIG_DEBUG_RODATA will inhibit the use of software breakpoints. Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
2008-08-01kgdb: remove the requirement for CONFIG_FRAME_POINTERJason Wessel
There is no technical reason that the kgdb core requires frame pointers. It is up to the end user of KGDB to decide if they need them or not. [ anemo@mba.ocn.ne.jp: removed frame pointers on mips ] Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
2008-08-01[JFFS2] Fix allocation of summary bufferDavid Woodhouse
We can't use vmalloc for the buffer we use for writing summaries, because some drivers may want to DMA from it. So limit the size to 64KiB and use kmalloc for it instead. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-01Fix rename of at91_nand -> atmel_nandPieter du Preez
Structs called at91_nand_data where renamed to atmel_nand_data and configs called *MTD_NAND_AT91* where renamed to *MTD_NAND_ATMEL*. This was unfortunately not done consistently, causing NAND chips not being initialised on several ARM boards. I am aware that the author of the original change did not rename MTD_NAND_AT91_BUSWIDTH to MTD_NAND_ATMEL_BUSWIDTH, for example. All *MTD_NAND_AT91* where renamed to *MTD_NAND_ATMEL* in order to keep naming consistency. This patch was only tested on a MACH_SAM9_L9260, as this is the only ARM board I have to my disposal. Before this patch: $ git-ls-files |xargs grep atmel_nand |wc -l 105 $ git-ls-files |xargs grep at91_nand |wc -l 4 $ git-ls-files |xargs grep MTD_NAND_ATMEL |wc -l 8 $ git-ls-files |xargs grep MTD_NAND_AT91 |wc -l 47 After this patch: $ git-ls-files |xargs grep atmel_nand |wc -l 109 $ git-ls-files |xargs grep at91_nand |wc -l 0 $ git-ls-files |xargs grep MTD_NAND_ATMEL |wc -l 55 $ git-ls-files |xargs grep MTD_NAND_AT91 |wc -l 0 Signed-off-by: Pieter du Preez <pdupreez@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-31tcp: MD5: Fix IPv6 signaturesAdam Langley
Reported by Stefanos Harhalakis; although 2.6.27-rc1 talks to itself using IPv6 TCP MD5 packets just fine, Stefanos noted that tcpdump claimed that the signatures were invalid. I broke this in 49a72dfb8814c2d65bd9f8c9c6daf6395a1ec58d ("tcp: Fix MD5 signatures for non-linear skbs"), it was just a typo. Note that tcpdump will still sometimes claim that the signatures are incorrect. A patch to tcpdump has been submitted for this[1]. [1] http://tinyurl.com/6a4fl2 Signed-off-by: Adam Langley <agl@imperialviolet.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-31skbuff: add missing kernel-doc for do_not_encryptRandy Dunlap
Add missing kernel-doc notation to sk_buff: Warning(linux-2.6.27-rc1-git2//include/linux/skbuff.h:345): No description found for parameter 'do_not_encrypt' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-31net/ipv4/route.c: fix build errorIngo Molnar
fix: net/ipv4/route.c: In function 'ip_static_sysctl_init': net/ipv4/route.c:3225: error: 'ipv4_route_path' undeclared (first use in this function) net/ipv4/route.c:3225: error: (Each undeclared identifier is reported only once net/ipv4/route.c:3225: error: for each function it appears in.) net/ipv4/route.c:3225: error: 'ipv4_route_table' undeclared (first use in this function) Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-31hwmon: needs new maintainerMark M. Hoffman
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31tcp: MD5: Fix MD5 signatures on certain ACK packetsAdam Langley
I noticed, looking at tcpdumps, that timewait ACKs were getting sent with an incorrect MD5 signature when signatures were enabled. I broke this in 49a72dfb8814c2d65bd9f8c9c6daf6395a1ec58d ("tcp: Fix MD5 signatures for non-linear skbs"). I didn't take into account that the skb passed to tcp_*_send_ack was the inbound packet, thus the source and dest addresses need to be swapped when calculating the MD5 pseudoheader. Signed-off-by: Adam Langley <agl@imperialviolet.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-31ipv6: Fix ip6_xmit to send fragments if ipfragok is trueWei Yongjun
SCTP used ip6_xmit() to send fragments after received ICMP packet too big message. But while send packet used ip6_xmit, the skb->local_df is not initialized. So when skb if enter ip6_fragment(), the following code will discard the skb. ip6_fragment(...) { if (!skb->local_df) { ... return -EMSGSIZE; } ... } SCTP do the following step: 1. send packet ip6_xmit(skb, ipfragok=0) 2. received ICMP packet too big message 3. if PMTUD_ENABLE: ip6_xmit(skb, ipfragok=1) This patch fixed the problem by set local_df if ipfragok is true. Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-31ipvs: Move userspace definitions to include/linux/ip_vs.hJulius Volz
Current versions of ipvsadm include "/usr/src/linux/include/net/ip_vs.h" directly. This file also contains kernel-only definitions. Normally, public definitions should live in include/linux, so this patch moves the definitions shared with userspace to a new file, "include/linux/ip_vs.h". This also removes the unused NFC_IPVS_PROPERTY bitmask, which was once used to point into skb->nfcache. To make old ipvsadms still compile with this, the old header file includes the new one. Thanks to Dave Miller and Horms for noting/adding the missing Kbuild entry for the new header file. Signed-off-by: Julius Volz <juliusv@google.com> Acked-by: Simon Horman <horms@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-31hwmon: (lm85) Simplify device initialization functionJean Delvare
Clean up and simplify the device initialization function: * Degrade error messages to warnings - what they really are. * Stop warning about VxI mode, we don't really care. * Drop comment about lack of limit initialization - that's the standard way, all hardware monitoring drivers do that. * Only read the configuration register once. * Only write back to the configuration register if needed. * Don't attempt to clear the lock bit, it locks itself to 1. * Move the function to before it's called, so that we no longer need to forware declare it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31hwmon: (lm85) Misc cleanupsJean Delvare
Misc cleanups to the lm85 hardware monitoring driver: * Mark constant arrays as const. * Remove useless masks. * Have lm85_write_value return void - nobody is checking the returned value anyway and in some cases it was plain wrong. * Remove useless initializations. * Rename new_client to client in lm85_detect. * Replace cascaded if/else with a switch/case in lm85_detect. * Group similar loops in lm85_update_device. * Remove legacy comments. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Juerg Haefliger <juergh at gmail.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31hwmon: (lm85) Don't write back cached valuesJean Delvare
In set_pwm_auto_pwm_minctl, we write cached register bits back to the chip. This is a bad idea as we have no guarantee that the cache is up-to-date. Better read a fresh register value from the chip, it's safer and in fact it is also more simple. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Juerg Haefliger <juergh at gmail.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31hwmon: (lm85) Drop dead codeJean Delvare
Drop a lot of useless register defines, conversion macros, data structure members and update code. All these register values were read from the device but nothing is done out of them, so this is all dead code in practice. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Juerg Haefliger <juergh at gmail.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31hwmon: (lm85) Coding-style cleanupsJean Delvare
Fix most style issues reported by checkpatch, including: * Trailing, missing and extra whitespace * Extra parentheses, curly braces and semi-colons * Broken indentation * Lines too long I verified that the generated code is the same before and after these changes. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Juerg Haefliger <juergh at gmail.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31hwmon: (lm75) add new-style driver bindingDavid Brownell
More LM75 updates: - Teach the LM75 driver to use new-style driver binding: * Create a second driver struct, using new-style driver binding methods cribbed from the legacy code. * Add a MODULE_DEVICE_TABLE (for "newER-style binding") * The legacy probe logic delegates its work to this new code. * The legacy driver now uses the name "lm75_legacy". - More careful initialization. Chips are put into 9-bit mode so the current interconversion routines will never fail. - Save the original chip configuration, and restore it on exit. (Among other things, this normally turns off the mode where the chip is constantly sampling ... and thus saves power.) So the new-style code should catch all chips that boards declare, while the legacy code catches others. This particular coexistence strategy may need some work yet ... legacy modes might best be set up explicitly by some tool not unlike "sensors-detect". (Or else completely eradicated...) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31hwmon: (lm75) cleanup/reorgDavid Brownell
Minor cleanup and reorg of the lm75 code. - Kconfig provides a larger list of lm75-compatible chips - A top comment now says what the driver does (!) ... as in, just what sort of sensor is this?? - Section comments now delineate the various sections of the driver: hwmon attributes, driver binding, register access, module glue. One driver binding function moved out of the attribute section, as did the driver struct itself. - Minor tweaks to legacy probe logic: correct a comment, and remove a pointless variable. - Whitespace, linelength, and comment fixes. This patch should include no functional changes. It's preparation for adding new-style (driver model) I2C driver binding. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Jean Delvare <khali@linux-fr.org> Acked-by: Laurent Pinchart <laurentp@cse-semaphore.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31hwmon: (adt7473) clarify an awkward bit of codeMark M. Hoffman
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com> Acked-by: Jean Delvare <khali@linux-fr.org>
2008-07-31hwmon: (adt7473) Remove unused definesJean Delvare
All the *_MAX_ADDR defines are never used, so remove them. The number of registers of each type is already expressed by the *_COUNT defines. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31hwmon: (dme1737) fix voltage scalingJuerg Haefliger
This patch fixes a voltage scaling issue for the sch311x device. Signed-Off-By: Juerg Haefliger <juergh at gmail.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31hwmon: (dme1737) probe all addressesJuerg Haefliger
This patch adds a module load parameter to enable probing of non-standard LPC addresses 0x162e and 0x164e when scanning for supported ISA chips. Signed-Off-By: Juerg Haefliger <juergh at gmail.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-07-31hwmon: (dme1737) demacrofy for readabilityJuerg Haefliger
This patch gets rid of a couple of macros previously used for sysfs attribute generation and manipulation. This makes the source a little bigger but a lot more readable and maintainable. It also fixes an issue with pwm5 & pwm6 attributes not being created read-only initially. Signed-Off-By: Juerg Haefliger <juergh at gmail.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-08-01md: raid10: wake up frozen arrayArthur Jones
When rescheduling a bio in raid10, we wake up the md thread, but if the array is frozen, this will have no effect. This causes the array to remain frozen for eternity. We add a wake_up to allow the array to de-freeze. This code is nearly identical to the raid1 code, which has this fix already. Signed-off-by: Arthur Jones <ajones@riverbed.com> Signed-off-by: NeilBrown <neilb@suse.de>
2008-07-31netdev: Fix lockdep warnings in multiqueue configurations.David S. Miller
When support for multiple TX queues were added, the netif_tx_lock() routines we converted to iterate over all TX queues and grab each queue's spinlock. This causes heartburn for lockdep and it's not a healthy thing to do with lots of TX queues anyways. So modify this to use a top-level lock and a "frozen" state for the individual TX queues. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-31[PATCH] ocfs2: Release mutex in error handling codeJulia Lawall
The mutex is released on a successful return, so it would seem that it should be released on an error return as well. The semantic patch finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ expression l; @@ mutex_lock(l); ... when != mutex_unlock(l) when any when strict ( if (...) { ... when != mutex_unlock(l) + mutex_unlock(l); return ...; } | mutex_unlock(l); ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
2008-07-31[PATCH] ocfs2: Fix oops when racing files truncates with writes into an mmap ↵Sunil Mushran
region This patch fixes an oops that is reproduced when one races writes to a mmap-ed region with another process truncating the file. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
2008-07-31[PATCH 2/2] ocfs2: Fix race between mount and recoverySunil Mushran
As the fs recovery is asynchronous, there is a small chance that another node can mount (and thus recover) the slot before the recovery thread gets to it. If this happens, the recovery thread will block indefinitely on the journal/slot lock as that lock will be held for the duration of the mount (by design) by the node assigned to that slot. The solution implemented is to keep track of the journal replays using a recovery generation in the journal inode, which will be incremented by the thread replaying that journal. The recovery thread, before attempting the blocking lock on the journal/slot lock, will compare the generation on disk with what it has cached and skip recovery if it does not match. This bug appears to have been inadvertently introduced during the mount/umount vote removal by mainline commit 34d024f84345807bf44163fac84e921513dde323. In the mount voting scheme, the messaging would indirectly indicate that the slot was being recovered. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
2008-07-31[PATCH 1/2] ocfs2: Add counter in struct ocfs2_dinode to track journal replaysSunil Mushran
This patch renames the ij_pad to ij_recovery_generation in struct ocfs2_dinode. This will be used to keep count of journal replays after an unclean shutdown. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
2008-07-31[PATCH] configfs: Convenience macros for attribute definition.Joel Becker
Sysfs has the _ATTR() and _ATTR_RO() macros to make defining extended form attributes easier. configfs should have something similiar. - _CONFIGFS_ATTR() and _CONFIGFS_ATTR_RO() are the counterparts to the sysfs macros. - CONFIGFS_ATTR_STRUCT() creates the extended form attribute structure. - CONFIGFS_ATTR_OPS() defines the show_attribute()/store_attribute() operations that call the show()/store() operations of the extended form configfs_attributes. Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
2008-07-31[PATCH] configfs: Pin configfs subsystems separately from new config_items.Joel Becker
configfs_mkdir() creates a new item by calling its parent's ->make_item/group() functions. Once that object is created, configfs_mkdir() calls try_module_get() on the new item's module. If it succeeds, the module owning the new item cannot be unloaded, and configfs is safe to reference the item. If the item and the subsystem it belongs to are part of the same module, the subsystem is also pinned. This is the common case. However, if the subsystem is made up of multiple modules, this may not pin the subsystem. Thus, it would be possible to unload the toplevel subsystem module while there is still a child item. Thus, we now try_module_get() the subsystem's module. This only really affects children of the toplevel subsystem group. Deeper children already have their parents pinned. Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
2008-07-31[PATCH] configfs: Fix open directory making rmdir() failLouis Rilling
When checking for user-created elements under an item to be removed by rmdir(), configfs_detach_prep() counts fake configfs_dirents created by dir_open() as user-created and fails when finding one. It is however perfectly valid to remove a directory that is open. Simply make configfs_detach_prep() skip fake configfs_dirent, like it already does for attributes, and like detach_groups() does. Signed-off-by: Louis Rilling <louis.rilling@kerlabs.com> Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
2008-07-31[PATCH] configfs: Lock new directory inodes before removing on cleanup after ↵Louis Rilling
failure Once a new configfs directory is created by configfs_attach_item() or configfs_attach_group(), a failure in the remaining initialization steps leads to removing a directory which inode the VFS may have already accessed. This commit adds the necessary inode locking to safely remove configfs directories while cleaning up after a failure. As an advantage, the locking rules of populate_groups() and detach_groups() become the same: the caller must have the group's inode mutex locked. Signed-off-by: Louis Rilling <louis.rilling@kerlabs.com> Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
2008-07-31[PATCH] configfs: Prevent userspace from creating new entries under ↵Louis Rilling
attaching directories process 1: process 2: configfs_mkdir("A") attach_group("A") attach_item("A") d_instantiate("A") populate_groups("A") mutex_lock("A") attach_group("A/B") attach_item("A") d_instantiate("A/B") mkdir("A/B/C") do_path_lookup("A/B/C", LOOKUP_PARENT) ok lookup_create("A/B/C") mutex_lock("A/B") ok configfs_mkdir("A/B/C") ok attach_group("A/C") attach_item("A/C") d_instantiate("A/C") populate_groups("A/C") mutex_lock("A/C") attach_group("A/C/D") attach_item("A/C/D") failure mutex_unlock("A/C") detach_groups("A/C") nothing to do mkdir("A/C/E") do_path_lookup("A/C/E", LOOKUP_PARENT) ok lookup_create("A/C/E") mutex_lock("A/C") ok configfs_mkdir("A/C/E") ok detach_item("A/C") d_delete("A/C") mutex_unlock("A") detach_groups("A") mutex_lock("A/B") detach_group("A/B") detach_groups("A/B") nothing since no _default_ group detach_item("A/B") mutex_unlock("A/B") d_delete("A/B") detach_item("A") d_delete("A") Two bugs: 1/ "A/B/C" and "A/C/E" are created, but never removed while their parent are removed in the end. The same could happen with symlink() instead of mkdir(). 2/ "A" and "A/C" inodes are not locked while detach_item() is called on them, which may probably confuse VFS. This commit fixes 1/, tagging new directories with CONFIGFS_USET_CREATING before building the inode and instantiating the dentry, and validating the whole group+default groups hierarchy in a second pass by clearing CONFIGFS_USET_CREATING. mkdir(), symlink(), lookup(), and dir_open() simply return -ENOENT if called in (or linking to) a directory tagged with CONFIGFS_USET_CREATING. This does not prevent userspace from calling stat() successfuly on such directories, but this prevents userspace from adding (children to | symlinking from/to | read/write attributes of | listing the contents of) not validated items. In other words, userspace will not interact with the subsystem on a new item until the new item creation completes correctly. It was first proposed to re-use CONFIGFS_USET_IN_MKDIR instead of a new flag CONFIGFS_USET_CREATING, but this generated conflicts when checking the target of a new symlink: a valid target directory in the middle of attaching a new user-created child item could be wrongly detected as being attached. 2/ is fixed by next commit. Signed-off-by: Louis Rilling <louis.rilling@kerlabs.com> Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
2008-07-31[PATCH] configfs: Fix failing symlink() making rmdir() failLouis Rilling
On a similar pattern as mkdir() vs rmdir(), a failing symlink() may make rmdir() fail for the symlink's parent and the symlink's target as well. failing symlink() making target's rmdir() fail: process 1: process 2: symlink("A/S" -> "B") allow_link() create_link() attach to "B" links list rmdir("B") detach_prep("B") error because of new link configfs_create_link("A", "S") error (eg -ENOMEM) failing symlink() making parent's rmdir() fail: process 1: process 2: symlink("A/D/S" -> "B") allow_link() create_link() attach to "B" links list configfs_create_link("A/D", "S") make_dirent("A/D", "S") rmdir("A") detach_prep("A") detach_prep("A/D") error because of "S" create("S") error (eg -ENOMEM) We cannot use the same solution as for mkdir() vs rmdir(), since rmdir() on the target cannot wait on the i_mutex of the new symlink's parent without risking a deadlock (with other symlink() or sys_rename()). Instead we define a global mutex protecting all configfs symlinks attachment, so that rmdir() can avoid the races above. Signed-off-by: Louis Rilling <louis.rilling@kerlabs.com> Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
2008-07-31[PATCH] configfs: Fix symlink() to a removing itemLouis Rilling
The rule for configfs symlinks is that symlinks always point to valid config_items, and prevent the target from being removed. However, configfs_symlink() only checks that it can grab a reference on the target item, without ensuring that it remains alive until the symlink is correctly attached. This patch makes configfs_symlink() fail whenever the target is being removed, using the CONFIGFS_USET_DROPPING flag set by configfs_detach_prep() and protected by configfs_dirent_lock. This patch introduces a similar (weird?) behavior as with mkdir failures making rmdir fail: if symlink() races with rmdir() of the parent directory (or its youngest user-created ancestor if parent is a default group) or rmdir() of the target directory, and then fails in configfs_create(), this can make the racing rmdir() fail despite the concerned directory having no user-created entry (resp. no symlink pointing to it or one of its default groups) in the end. This behavior is fixed in later patches. Signed-off-by: Louis Rilling <louis.rilling@kerlabs.com> Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
2008-07-31[PATCH] configfs: Include linux/err.h in linux/configfs.hJoel Becker
We now use PTR_ERR() in the ->make_item() and ->make_group() operations. Folks including configfs.h need err.h. Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
2008-07-31kbuild: scripts/ver_linux: don't set PATHAdrian Bunk
It would have saved both a bug submitter and me a few hours if scripts/ver_linux had picked the same gcc as the build. Since I can't see any reason why it fiddles with PATH at all this patch therefore removes the PATH setting. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-31Kconfig/init: change help text to match default valuejkacur
Change the "If unsure" message to match the default value. Signed-off-by: John Kacur <jkacur at gmail dot com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-31kbuild: genksyms: Include extern information in dumpsAndreas Gruenbacher
The extern flag currently is not included in type dump files (genksyms --dump-types). Include that flag there for completeness. Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-31kbuild: genksyms parser: fix the __attribute__ ruleAndreas Gruenbacher
We are having two kinds of problems with genksyms today: fake checksum changes without actual ABI changes, and changes which we would rather like to ignore (such as an additional field at the end of a structure that modules are not supposed to touch, for example). I have thought about ways to improve genksyms and compute checksums differently to avoid those problems, but in the end I don't see a fundamentally better way. So here are some genksyms patches for at least making the checksums more easily manageable, if we cannot fully fix them. In addition to the bugfixes (the first two patches), this allows genksyms to track checksum changes and report why a checksum changed (third patch), and to selectively ignore changes (fourth patch). This patch: Gcc __attribute__ definitions may occur repeatedly, e.g., static int foo __attribute__((__used__)) __attribute__((aligned (16))); The genksyms parser does not understand this, and generates a syntax error. Fix this case. Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Cc: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-31KVM: s390: Fix kvm on IBM System z10Christian Borntraeger
The z10 system supports large pages, kvm-s390 doesnt. Make sure that we dont advertise large pages to avoid the guest crashing as soon as the guest kernel activates DAT. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-07-31drivers/media, include/media: delete zero-length filesJeff Garzik
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-31netfilter: xt_hashlimit: fix race between htable_destroy and htable_gcPavel Emelyanov
Deleting a timer with del_timer doesn't guarantee, that the timer function is not running at the moment of deletion. Thus in the xt_hashlimit case we can get into a ticklish situation when the htable_gc rearms the timer back and we'll actually delete an entry with a pending timer. Fix it with using del_timer_sync(). AFAIK del_timer_sync checks for the timer to be pending by itself, so I remove the check. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-31netfilter: ipt_recent: fix race between recent_mt_destroy and proc manipulationsPavel Emelyanov
The thing is that recent_mt_destroy first flushes the entries from table with the recent_table_flush and only *after* this removes the proc file, corresponding to that table. Thus, if we manage to write to this file the '+XXX' command we will leak some entries. If we manage to write there a 'clean' command we'll race in two recent_table_flush flows, since the recent_mt_destroy calls this outside the recent_lock. The proper solution as I see it is to remove the proc file first and then go on with flushing the table. This flushing becomes safe w/o the lock, since the table is already inaccessible from the outside. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-31netfilter: nf_conntrack_tcp: decrease timeouts while data in unacknowledgedPatrick McHardy
In order to time out dead connections quicker, keep track of outstanding data and cap the timeout. Suggested by Herbert Xu. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-31[MTD] [NOR] drivers/mtd/chips/jedec_probe.c: fix Am29DL800BB device IDJerry Hicks
The device id for Am29DL800BB in jedec_probe.c is wrong. Reference: http://www.spansion.com/datasheets/21519c4.pdf I discovered this while working with u-boot. The u-boot folks mentioned Linux as an upstream reference, thought I'd post a heads-up here too. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-31pata_it821x: Driver updates and reworkingAlan Cox
- Add support for the RDC 1010 variant - Rework the core library to have a read_id method. This allows the hacky bits of it821x to go and prepares us for pata_hd - Switch from WARN to BUG in ata_id_string as it will reboot if you get it wrong so WARN won't be seen - Allow the issue of command 0xFC on the 821x. This is needed to query rebuild status. - Tidy up printk formatting - Do more ident rewriting on RAID volumes to handle firmware provided ident data which is rather wonky - Report the firmware revision and device layout in RAID mode - Don't try and disable raid on the 8211 or RDC - they don't have the relevant bits Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-31libata.h: replace __FUNCTION__ with __func__Alexander Beregalov
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>