Nick Piggin [Sat, 10 Feb 2007 09:46:22 +0000 (01:46 -0800)]
[PATCH] buffer: memorder fix
unlock_buffer(), like unlock_page(), must not clear the lock without
ensuring that the critical section is closed.
Mingming later sent the same patch, saying:
We are running SDET benchmark and saw double free issue for ext3 extended
attributes block, which complains the same xattr block already being freed (in
ext3_xattr_release_block()). The problem could also been triggered by
multiple threads loop untar/rm a kernel tree.
The race is caused by missing a memory barrier at unlock_buffer() before the
lock bit being cleared, resulting in possible concurrent h_refcounter update.
That causes a reference counter leak, then later leads to the double free that
we have seen.
Inside unlock_buffer(), there is a memory barrier is placed *after* the lock
bit is being cleared, however, there is no memory barrier *before* the bit is
cleared. On some arch the h_refcount update instruction and the clear bit
instruction could be reordered, thus leave the critical section re-entered.
The race is like this: For example, if the h_refcount is initialized as 1,
Once these are in place, it's up to subsystem maintainers to decide if they
want to take advantage of them. there is already a strong precedent for
using shortcuts like this in the source tree.
The ones that might give people pause are "__aligned" and "__printf", but
shortcuts for both of those are already in use, and in some ways very
confusingly. note the two very different definitions for a macro named
"ALIGNED":
Given the precedent, then, it seems logical to at least standardize on a
consistent set of these macros.
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Kirill Korotaev [Sat, 10 Feb 2007 09:46:19 +0000 (01:46 -0800)]
[PATCH] Extract and use wake_up_klogd()
Remove hack with printing space to wake up klogd. Use explicit
wake_up_klogd().
See earlier discussion
http://groups.google.com/group/fa.linux.kernel/browse_frm/thread/75f496668409f58d/1a8f28983a51e1ff?lnk=st&q=wake_up_klogd+group%3Afa.linux.kernel&rnum=2#1a8f28983a51e1ff
Robert P. J. Day [Sat, 10 Feb 2007 09:46:17 +0000 (01:46 -0800)]
[PATCH] Remove the last reference to rwlock_is_locked() macro.
Remove the lone, remaining reference to the long-deceased
rwlock_is_locked() macro.
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eric Sandeen [Sat, 10 Feb 2007 09:46:16 +0000 (01:46 -0800)]
[PATCH] remove ext[34]_inc_count and _dec_count
- Naming is confusing, ext3_inc_count manipulates i_nlink not i_count
- handle argument passed in is not used
- ext3 and ext4 already call inc_nlink and dec_nlink directly in other places
Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eric Sandeen [Sat, 10 Feb 2007 09:46:16 +0000 (01:46 -0800)]
[PATCH] return ENOENT from ext3_link when racing with unlink
Return -ENOENT from ext[34]_link if we've raced with unlink and i_nlink is
0. Doing otherwise has the potential to corrupt the orphan inode list,
because we'd wind up with an inode with a non-zero link count on the list,
and it will never get properly cleaned up & removed from the orphan list
before it is freed.
[akpm@osdl.org: build fix] Signed-off-by: Eric Sandeen <sandeen@redhat.com> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Hugh Dickins [Sat, 10 Feb 2007 09:46:13 +0000 (01:46 -0800)]
[PATCH] fix umask when noACL kernel meets extN tuned for ACLs
Fix insecure default behaviour reported by Tigran Aivazian: if an ext2 or
ext3 or ext4 filesystem is tuned to mount with "acl", but mounted by a
kernel built without ACL support, then umask was ignored when creating
inodes - though root or user has umask 022, touch creates files as 0666,
and mkdir creates directories as 0777.
This appears to have worked right until 2.6.11, when a fix to the default
mode on symlinks (always 0777) assumed VFS applies umask: which it does,
unless the mount is marked for ACLs; but ext[234] set MS_POSIXACL in
s_flags according to s_mount_opt set according to def_mount_opts.
We could revert to the 2.6.10 ext[234]_init_acl (adding an S_ISLNK test);
but other filesystems only set MS_POSIXACL when ACLs are configured. We
could fix this at another level; but it seems most robust to avoid setting
the s_mount_opt flag in the first place (at the expense of more ifdefs).
Likewise don't set the XATTR_USER flag when built without XATTR support.
Jeff Moyer [Sat, 10 Feb 2007 09:46:10 +0000 (01:46 -0800)]
[PATCH] raw: don't allow the creation of a raw device with minor number 0
Minor number 0 (under the raw major) is reserved for the rawctl device
file, which is used to query, set, and unset raw device bindings. However,
the ioctl interface does not protect the user from specifying a raw device
with minor number 0:
$ sudo ./raw /dev/raw/raw0 /dev/VolGroup00/swap
/dev/raw/raw0: bound to major 253, minor 2
$ ls -l /dev/rawctl
ls: /dev/rawctl: No such file or directory
$ ls -l /dev/raw/raw0
crw------- 1 root root 162, 0 Jan 12 10:51 /dev/raw/raw0
$ sudo ./raw -qa
Cannot open master raw device '/dev/rawctl' (No such file or directory)
As you can see, this prevents any further raw operations from
succeeding. The fix (from Steve Fernandez) is quite simple--do not
allow the allocation of minor number 0.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Cc: Steven Fernandez <sfernand@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/auditfilter.c: In function 'audit_filter_user':
kernel/auditfilter.c:1611: warning: 'state' is used uninitialized in this function
I tend to agree with gcc - there are a couple of plausible exit paths from
audit_filter_user_rules() where it does not set 'state', keeping the
variable uninitialized. For example if a filter rule has an AUDIT_POSSIBLE
action. Initialize to 'wont audit'. Fix whitespace damage too.
Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eric Sandeen [Sat, 10 Feb 2007 09:46:08 +0000 (01:46 -0800)]
[PATCH] ext4: refuse ro to rw remount of fs with orphan inodes
In the rare case where we have skipped orphan inode processing due to a
readonly block device, and the block device subsequently changes back to
read-write, disallow a remount,rw transition of the filesystem when we have an
unprocessed orphan inodes as this would corrupt the list.
Ideally we should process the orphan inode list during the remount, but that's
trickier, and this plugs the hole for now.
Signed-off-by: Eric Sandeen <sandeen@redhat.com> Cc: "Stephen C. Tweedie" <sct@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eric Sandeen [Sat, 10 Feb 2007 09:46:07 +0000 (01:46 -0800)]
[PATCH] ext3: refuse ro to rw remount of fs with orphan inodes
In the rare case where we have skipped orphan inode processing due to a
readonly block device, and the block device subsequently changes back to
read-write, disallow a remount,rw transition of the filesystem when we have an
unprocessed orphan inodes as this would corrupt the list.
Ideally we should process the orphan inode list during the remount, but that's
trickier, and this plugs the hole for now.
Signed-off-by: Eric Sandeen <sandeen@redhat.com> Cc: "Stephen C. Tweedie" <sct@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Thomas Hoehn [Sat, 10 Feb 2007 09:46:05 +0000 (01:46 -0800)]
[PATCH] Perle multimodem card (PCI-RAS) detection
Get the Perle quad-modem PCI card (PCI-RAS4) detected by serial driver. It
may also get the PCI-RAS8 running, but can't guarantee as I didn't had one for
testing.
Signed-off-by: Thomas Hoehn <thomas.hoehn@avocent.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Randy Dunlap [Sat, 10 Feb 2007 09:46:04 +0000 (01:46 -0800)]
[PATCH] kernel-doc: fix some odd spacing issues
- in man and text mode output, if the function return type is empty (like it
is for macros), don't print the return type and a following space; this
fixes an output malalignment;
- in the function short description, strip leading, trailing, and multiple
embedded spaces (to one space); this makes function name/description output
spacing consistent;
- fix a comment typo;
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Brownell [Sat, 10 Feb 2007 09:46:02 +0000 (01:46 -0800)]
[PATCH] RTC framework driver for CMOS RTCs
This is an "RTC framework" driver for the "CMOS" RTCs which are standard on
PCs and some other platforms. That's MC146818 compatible silicon.
Advantages of this vs. drivers/char/rtc.c (use one _or_ the other, only
one will be able to claim the RTC irq) include:
- This leverages both the new RTC framework and the driver model; both
PNPACPI and platform device modes are supported. (A separate patch
creates a platform device on PCs where PNPACPI isn't configured.)
- It supports common extensions like longer alarms. (A separate patch
exports that information from ACPI through platform_data.)
- Likewise, system wakeup events use "real driver model support", with
policy control via sysfs "wakeup" attributes and and using normal rtc
ioctls to manage wakeup. (Patch in the works. The ACPI hooks are
known; /proc/acpi/alarm can vanish. Making it work with EFI will
be a minor challenge to someone with e.g. a MiniMac.)
It's not yet been tested on non-x86 systems, without ACPI, or with HPET.
And the RTC framework will surely have teething pains on "mainstream"
PC-based systems (though must embedded Linux systems use it heavily), not
limited to sorting out the "/dev/rtc0" issue (udev easily tweaked). Also,
the ALSA rtctimer code doesn't use the new RTC API.
Otherwise, this should be a no-known-regressions replacement for the old
drivers/char/rtc.c driver, and should help the non-embedded distros (and
the new timekeeping code) start to switch to the framework.
Note also that any systems using "rtc-m48t86" are candidates to switch over
to this more functional driver; the platform data is different, and the way
bytes are read is different, but otherwise those chips should be compatible.
Kyle McMartin [Sat, 10 Feb 2007 09:46:00 +0000 (01:46 -0800)]
[PATCH] Common compat_sys_sysinfo
I noticed that almost all architectures implemented exactly the same
sys32_sysinfo... except parisc, where a bug was to be found in handling of
the uptime. So let's remove a whole whack of code for fun and profit.
Cribbed compat_sys_sysinfo from x86_64's implementation, since I figured it
would be the best tested.
This patch incorporates Arnd's suggestion of not using set_fs/get_fs, but
instead extracting out the common code from sys_sysinfo.
Cc: Christoph Hellwig <hch@infradead.org> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Robert P. J. Day [Sat, 10 Feb 2007 09:45:59 +0000 (01:45 -0800)]
[PATCH] Numerous fixes to kernel-doc info in source files.
A variety of (mostly) innocuous fixes to the embedded kernel-doc content in
source files, including:
* make multi-line initial descriptions single line
* denote some function names, constants and structs as such
* change erroneous opening '/*' to '/**' in a few places
* reword some text for clarity
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Cc: "Randy.Dunlap" <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Robert P. J. Day [Sat, 10 Feb 2007 09:45:58 +0000 (01:45 -0800)]
[PATCH] Discuss a couple common errors in kernel-doc usage.
Explain a couple of the most common errors in kernel-doc usage.
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Alan Cox [Sat, 10 Feb 2007 09:45:57 +0000 (01:45 -0800)]
[PATCH] tty: improve encode_baud_rate logic
Mostly so people can see the work in progress. This enhances the encode
function which isn't currently used in the base tree but is when using some of
the testing tty patches.
This resolves a problem with some hardware where applications got confusing
information from the tty ioctls. Correct but confusing.
In some situations asking for, say, 9600 baud actually gets you 9595 baud or
similar near-miss values. With the old code this meant that a request for
B9600 got a return of BOTHER, 9595 which programs interpreted as a failure.
The new code now works on the following basis
- If you ask for specific rate via BOTHER, you get a precise return
- If you ask for a standard Bfoo rate and the result is close you get a Bfoo
return
- If you ask for a standard Bfoo rate and get something way off you get a
BOTHER/rate return
This seems to fix up the cases I've found where this broke compatibility.
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Randy Dunlap [Sat, 10 Feb 2007 09:45:53 +0000 (01:45 -0800)]
[PATCH] kernel-doc: allow a little whitespace
In kernel-doc syntax, be a little flexible: allow whitespace between
a function parameter name and the colon that must follow it, such as:
@pdev : PCI device to unplug
(This allows lots of megaraid kernel-doc to work without tons of
editing.)
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Robert P. J. Day [Sat, 10 Feb 2007 09:45:52 +0000 (01:45 -0800)]
[PATCH] Remove unnecessary memset(0) calls after kzalloc() calls.
Delete the few remaining unnecessary calls to memset(0) after a call to
kzalloc().
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Cc: Andi Kleen <ak@suse.de> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Adam Belay <ambx1@neo.rr.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[PATCH] Add const for time{spec,val}_compare arguments
The arguments are really const. Mark them const to allow these functions
being called from places where the arguments are const without getting
useless compiler warnings.
Olaf Hering [Sat, 10 Feb 2007 09:45:47 +0000 (01:45 -0800)]
[PATCH] relax check for AIX in msdos partition table
The patch to identify AIX disks and ignore them has caused at least one
machine to fail to find the root partition on 2.6.19. The patch is:
http://lkml.org/lkml/2006/7/31/117
The problem is some disk formatters do not blow away the first 4 bytes
of the disk. If the disk we are installing to used to have AIX on it,
then the first 4 bytes will still have IBMA in EBCDIC.
The install in question was debian etch. Im not sure what the best fix
is, perhaps the AIX detection code could check more than the first 4
bytes.
The whole partition info for primary partitions is in this block:
Robert P. J. Day [Sat, 10 Feb 2007 09:45:46 +0000 (01:45 -0800)]
[PATCH] Get rid of "double zeroing" of allocated pages
Simplify the few instances where a call to "get_zeroed_page()" is closely
followed by an unnecessary call to memset() to clear that page.
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Cc: chas williams <chas@cmf.nrl.navy.mil> Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: James Bottomley <James.Bottomley@steeleye.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Corey Minyard [Sat, 10 Feb 2007 09:45:45 +0000 (01:45 -0800)]
[PATCH] IPMI: Fix some RCU problems
Fix some RCU problem pointed out by Paul McKenney of IBM. These are:
The wholesale move of the command receivers list into a new list was not
safe because the list will point to the new tail during a traversal, so the
traversal will never end on a reader if this happens during a read.
Memory barriers were needed to handle proper ordering of the setting of the
IPMI interface as valid. Readers might not see proper ordering of data
otherwise.
In ipmi_smi_watcher_register(), the use of the _rcu suffix on the list is
unnecessary.
This require the list_splice_init_rcu() patch previously posted.
Signed-off-by: Corey Minyard <minyard@acm.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Corey Minyard [Sat, 10 Feb 2007 09:45:42 +0000 (01:45 -0800)]
[PATCH] add an RCU version of list splicing
This patch is in support of the IPMI driver. I have tested this with the
IPMI driver changes coming in the next patch.
Add a list_splice_init_rcu() function to splice an RCU-protected list into
another list. This takes the sync function as an argument, so one would do
something like:
Helge Deller [Sat, 10 Feb 2007 09:45:40 +0000 (01:45 -0800)]
[PATCH] use cycle_t instead of u64 in struct time_interpolator
The 32bit and 64bit PARISC Linux kernels suffers from the problem, that the
gettimeofday() call sometimes returns non-monotonic times.
The easiest way to fix this, is to drop the PARISC-specific implementation
and switch over to the generic TIME_INTERPOLATION framework.
But in order to make it even compile on 32bit PARISC, the patch below which
touches the generic Linux code, is mandatory.
More information and the full patch with the parisc-specific changes is included in this thread: http://lists.parisc-linux.org/pipermail/parisc-linux/2006-December/031003.html
As far as I could see, this patch does not change anything for the existing
architectures which use this framework (IA64 and SPARC64), since "cycles_t"
is defined there as unsigned 64bit-integer anyway (which then makes this
patch a no-change for them).
[PATCH] Export invalidate_mapping_pages() to modules
It makes no sense to me to export invalidate_inode_pages() and not
invalidate_mapping_pages() and I actually need invalidate_mapping_pages()
because of its range specification ability...
akpm: also remove the export of invalidate_inode_pages() by making it an
inlined wrapper.
Signed-off-by: Anton Altaparmakov <aia21@cantab.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Slaby [Sat, 10 Feb 2007 09:45:33 +0000 (01:45 -0800)]
[PATCH] Char: moxa, variables cleanup
- rename moxaChannels to moxa_port
- rename moxa_str to moxa_ports
- move board global variables into moxa_board
- move port global variables into moxa_port
Jiri Slaby [Sat, 10 Feb 2007 09:45:27 +0000 (01:45 -0800)]
[PATCH] Char: moxa, timers cleanup
Use kernel macros and functions for timer encapsulation -- do not access
fileds directly. Also del_timer on inactive is legal, so that noting if it
runs is senseless, delete these variables.
Jiri Slaby [Sat, 10 Feb 2007 09:45:25 +0000 (01:45 -0800)]
[PATCH] Char: moxa, remove unused allocated page
moxaXmitBuff is almost unused -- only one byte from the whole PAGE_SIZE bytes
is used. Do not alloc so much space for almost anything. Also remove lock
protecting this page allocation.
Theodore Ts'o [Sat, 10 Feb 2007 09:45:24 +0000 (01:45 -0800)]
[PATCH] Add TAINT_USER and ability to set taint flags from userspace
Allow taint flags to be set from userspace by writing to
/proc/sys/kernel/tainted, and add a new taint flag, TAINT_USER, to be used
when userspace has potentially done something dangerous that might
compromise the kernel. This will allow support personnel to ask further
questions about what may have caused the user taint flag to have been set.
For example, they might examine the logs of the realtime JVM to see if the
Java program has used the really silly, stupid, dangerous, and
completely-non-portable direct access to physical memory feature which MUST
be implemented according to the Real-Time Specification for Java (RTSJ).
Sigh. What were those silly people at Sun thinking?
Jiri Slaby [Sat, 10 Feb 2007 09:45:22 +0000 (01:45 -0800)]
[PATCH] Char: mxser_new, do not null driver_data
driver_data are initialzed to NULL from tty layer, no need to do it in the
driver. In this case it cases oops, since driver_data may be NULL for a short
while for another closing process.
Because brd->info is not NULLed, resources are released twice. NULL it in
pci_remove function. Also take care of retval and releasing in pci_probe --
mxser_initbrd alreasy releases resource, do not do it again in fail path in
probe function.
Cc: Sergei Organov <osv@javad.com> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Slaby [Sat, 10 Feb 2007 09:45:18 +0000 (01:45 -0800)]
[PATCH] Char: mxser_new, alter locking in isr
Avoid oopsing when stress-testing open/close -- port->tty is NULL sometimes,
but is expected to be non-NULL, since dereferencing. Receive/transmit chars
iff ASYNC_CLOSING is not set and ASYNC_INITIALIZED is set. Thanks Sergei for
pointing this out and testing.
Cc: Sergei Organov <osv@javad.com> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Slaby [Sat, 10 Feb 2007 09:45:17 +0000 (01:45 -0800)]
[PATCH] Doc: isicom, remove reserved ioctl-number
Isicom driver no longer registers chardev with ioctl function. It used to
use for firmware loading. Remove the reserved letter (M) from
ioctl-number, so that the conflict get away.
David Brownell [Sat, 10 Feb 2007 09:45:13 +0000 (01:45 -0800)]
[PATCH] PNP: export pnp_bus_type
The PNP framework doesn't export "pnp_bus_type", which is an unfortunate
exception to the policy followed by pretty much every other bus. I noticed
this when I had to find a device in order to provide its platform_data.
Note that per advice from Arjan, the "export" scope has been been minimized to
avoid the hundred-plus bytes needed to support access from modules. In this
case, the symbol is only needed by statically linked kernel code that lives
outside the drivers/pnp directory.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Adam Belay <ambx1@neo.rr.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eric Sandeen [Sat, 10 Feb 2007 09:45:06 +0000 (01:45 -0800)]
[PATCH] ext2: skip pages past number of blocks in ext2_find_entry
This one was pointed out on the MOKB site:
http://kernelfun.blogspot.com/2006/11/mokb-09-11-2006-linux-26x-ext2checkpage.html
If a directory's i_size is corrupted, ext2_find_entry() will keep
processing pages until the i_size is reached, even if there are no more
blocks associated with the directory inode. This patch puts in some
minimal sanity-checking so that we don't keep checking pages (and issuing
errors) if we know there can be no more data to read, based on the block
count of the directory inode.
This is somewhat similar in approach to the ext3 patch I sent earlier this
year.
Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Mathieu originally needed to add this for tracing Xen, but it's something
that's needed for any application that can be tracing while cpus are added.
unplug isn't supported by this patch. The thought was that at minumum a new
buffer needs to be added when a cpu comes up, but it wasn't worth the effort
to remove buffers on cpu down since they'd be freed soon anyway when the
channel was closed.
[zanussi@us.ibm.com: avoid lock_cpu_hotplug deadlock] Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Tom Zanussi <zanussi@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Atsushi Nemoto [Sat, 10 Feb 2007 09:45:05 +0000 (01:45 -0800)]
[PATCH] serial: serial_txx9 driver update
Update the serial_txx9 driver.
* Configurable manumum port number. (SERIAL_TXX9_NR_UARTS)
* Remove some code which is unneeded if CONFIG_PM=n.
* Use PCI_DEVICE() for pci device id table and make it const.
* Do not include <asm/irq.h>
Replace appropriate pairs of "kmem_cache_alloc()" + "memset(0)" with the
corresponding "kmem_cache_zalloc()" call.
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Andi Kleen <ak@muc.de> Cc: Roland McGrath <roland@redhat.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Greg KH <greg@kroah.com> Acked-by: Joel Becker <Joel.Becker@oracle.com> Cc: Steven Whitehouse <swhiteho@redhat.com> Cc: Jan Kara <jack@ucw.cz> Cc: Michael Halcrow <mhalcrow@us.ibm.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Stephen Smalley <sds@tycho.nsa.gov> Cc: James Morris <jmorris@namei.org> Cc: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Mike Frysinger [Sat, 10 Feb 2007 09:45:01 +0000 (01:45 -0800)]
[PATCH] scrub non-__GLIBC__ checks in linux/socket.h and linux/stat.h
Userspace should be worrying about userspace, so having the socket.h
and stat.h pollute the namespace in the non-glibc case is wrong and
pretty much prevents any other libc from utilizing these headers
sanely unless they set up the __GLIBC__ define themselves (which
sucks)
Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tilman Schmidt [Sat, 10 Feb 2007 09:45:00 +0000 (01:45 -0800)]
[PATCH] consolidate line discipline number definitions
The line discipline numbers N_* are currently defined for each architecture
individually, but (except for a seeming mistake) identically, in
asm/termios.h. There is no obvious reason why these numbers should be
architecture specific, nor any apparent relationship with the termios
structure. The total number of these, NR_LDISCS, is defined in linux/tty.h
anyway. So I propose the following patch which moves the definitions of
the individual line disciplines to linux/tty.h too.
Three of these numbers (N_MASC, N_PROFIBUS_FDL, and N_SMSBLOCK) are unused
in the current kernel, but the patch still keeps the complete set in case
there are plans to use them yet.
Jan Blunck [Sat, 10 Feb 2007 09:44:59 +0000 (01:44 -0800)]
[PATCH] igrab() should check for I_CLEAR
When igrab() is calling __iget() on an inode it should check if
clear_inode() has been called on the inode already. Otherwise there is a
race window between clear_inode() and destroy_inode() where igrab() calls
__iget() which leads to already free inodes on the inode lists.
Signed-off-by: Vandana Rungta <vandana@novell.com> Signed-off-by: Jan Blunck <jblunck@suse.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jarek Poplawski [Sat, 10 Feb 2007 09:44:58 +0000 (01:44 -0800)]
[PATCH] lockdep: more unlock-on-error fixes
- returns after DEBUG_LOCKS_WARN_ON added in 3 places
- debug_locks checking after lookup_chain_cache() added in
__lock_acquire()
- locking for testing and changing global variable max_lockdep_depth
added in __lock_acquire()
From: Ingo Molnar <mingo@elte.hu>
My __acquire_lock() cleanup introduced a locking bug: on SMP systems we'd
release a non-owned graph lock. Fix this by moving the graph unlock back,
and by leaving the max_lockdep_depth variable update possibly racy. (we
dont care, it's just statistics)
Also add some minimal debugging code to graph_unlock()/graph_lock(),
which caught this locking bug.
Jiri Slaby [Sat, 10 Feb 2007 09:44:55 +0000 (01:44 -0800)]
[PATCH] Char: isicom, correct probing/removing
Don't forget to decrease card_count in fail paths and in remove function.
Also null board->base in such cases to point out, that this structure is
unused and thus can be reassigned.