Jean Tourrilhes [Thu, 21 Oct 2004 15:09:38 +0000 (08:09 -0700)]
[IRDA]: Adaptive discovery query timer
o [FEATURE] Adapt to the rate of the peer discovery (passive discovery)
o [FEATURE] Add extra safety margin in passive discovery
Allow to interoperate properly with device performing slow discovery
Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Jean Tourrilhes [Thu, 21 Oct 2004 15:06:57 +0000 (08:06 -0700)]
[IRDA]: Fix lmp_lsap_inuse()
o [CRITICA] Fix locking in error path in IrLMP (Stanford checker)
o [CORRECT] Don't reuse unconnected LSAPs (listening sockets)
o [CORRECT] Make sure the LSAP we are picking has just not been grabed
o [CORRECT] Wrap around the LSAP space properly back to 0x10
Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Andrew Morton [Thu, 21 Oct 2004 14:55:58 +0000 (07:55 -0700)]
[NET]: Add new sysfs attribute 'carrier' for net devices.
From: Jesper Juhl <juhl-lkml@dif.dk>
The patch adds a new sysfs attribute called carrier for net devices that
exposes the result of netif_carrier_ok(). This allows a user to quickly
and easily determine if a given netdevice has carrier or not. Reading
/sys/class/net/<interface>/carrier yields a '1' when there is a carrier and
a '0' when there is not.
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
[NET]: Replace dst_release refcount error with standard WARN_ON
Replace the dst count underflow bug message with a standard WARN message.
This makes errors noticeable and also reduces the kernel text size by 600
since we aren't doing as much to setup the printk.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Andrew Morton [Wed, 20 Oct 2004 15:04:24 +0000 (08:04 -0700)]
[NETFILTER]: Avoid warning on CONNTRACK_STAT_INC in death_by_timeout()
Module removal can call death_by_timeout() manually, which isn't in softirq
context, so the CONNTRACK_STAT_INC() call there (which assumes preempt
disabled) can give a warning. Of course, the warning here is spurious, but
the simplest workaround is to call CONNTRACK_STAT_INC() inside the lock.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Harald Welte [Wed, 20 Oct 2004 14:14:41 +0000 (07:14 -0700)]
[NETFILTER]: Add iptables CONNMARK match+target
This is the first patch, adding something similar like nfmark, but on a
per-conntrack (as opposed to per-skb) level. Very useful especially for
asymmatric routing in combination with MASQUERADE, as often found on
home DSL setups with dymamic IP address that also have e.g. a tunnel
device with static IP.
Signed-off-by: Henrik Nordstrom <hno@marasystems.com> Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy [Wed, 20 Oct 2004 14:06:04 +0000 (07:06 -0700)]
[IPV6]: Fix netdevice/inet6_dev reference leaks in ip6_route_add error paths
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Jesse Barnes [Wed, 20 Oct 2004 22:53:23 +0000 (22:53 +0000)]
[IA64-SGI] more sparse I/O accessor fixes
I forgot to add 'const volatile' to the I/O read/write functions in the last
patch, and also forgot to update the _relaxed variants. This patch fixes
that by adding 'const volatile' to the sn2 specific read/write routines as
well as the ia64 machine vector wrappers.
Signed-off-by: Jesse Barnes <jbarnes@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Jesse Barnes [Wed, 20 Oct 2004 20:40:02 +0000 (20:40 +0000)]
[IA64-SGI] sparse cleanups & misc fixes for sn2
This is a big patch mostly because I trimmed shub_mmr.h down from 17M to 11k
or so. It fixes a number of things sparse discovered and removes some dead
code, fixes up some prototypes, etc. Of note:
o sn_proc_fs.c was directly dereferencing user pointers, fixed
o sn_hwperf.c was missing an include and was using asm-ia64 directly
o the I/O routines were all missing proper sparse annotations
o dead code in prominfo_proc.c has been removed
o fix generic build by putting numionodes into asm/sn/io.h
With this patch applied, the check build is pretty clean. The sn_console bit
depends on some of the other changes, so it's included here.
Signed-off-by: Jesse Barnes <jbarnes@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
John Hawkes [Wed, 20 Oct 2004 18:23:39 +0000 (18:23 +0000)]
[IA64] top level scheduler domain for ia64
Some have noticed that the overlapping sched domains code doesn't quite work
as intended (it results in disjoint domains on some machines), and that a top
level, machine spanning domain is needed. This patch from John Hawkes adds
it to the ia64 code. This allows processes to run on all CPUs in large
systems, though balancing is limited. It should go to Linus soon now
otherwise large systems will only have ~16p (depending on topology) usable by
the scheduler. I sanity checked it on a small system after rediffing John's
original, and he's done some testing on very large systems.
Nick, can you buy off on the sched.c change? Alternatively, do you want to
send that fix separately John? Nick did indeed ACK this change, but it isn't
dependent on this ia64 specific part ... so it's going to be submitted
separately.
Signed-off-by: John Hawkes <hawkes@sgi.com> Signed-off-by: Jesse Barnes <jbarnes@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Use PIO code from ide-taskfile.c in ide-disk.c so:
* drive status is checked after PIO read
* request is failed if invalid data phase
is detected during PIO write
Russell King [Wed, 20 Oct 2004 21:34:23 +0000 (22:34 +0100)]
[ARM] Add seqlocking to timers.
Sometimes, it's useful to have locking. Especially when we're
talking about time keeping.
It would appear that shemminger's patch of 5th February 2003
completely missed updating _ANY_ ARM timer implementations and,
because linux-arch didn't exist at the time, there appears to
have been no notification to any architecture developer that
maybe, just maybe, some work was required.
One wonders how many other changes are in the kernel which
architecture maintainers have missed.
Russell King [Wed, 20 Oct 2004 15:47:09 +0000 (16:47 +0100)]
[ARM] Cleanup some quirks.
- Ensure FIQs are enabled when cpu_idle() is called.
- Remove unused members of irq_cpustat_t.
- Remove unnecessary #ifndef CONFIG_SMP...#endif around irq_exit()
macro.
- Rename __stf/__clf such that it stresses that they affect only
local state (as per local_irq_xxx).
- Move THREAD_SIZE such that it can be used in current_thread_info()
Suresh B. Siddha [Wed, 20 Oct 2004 06:43:58 +0000 (06:43 +0000)]
[IA64] fallback to swiotlb for consistent DMA mappings
Patch supplied by Suresh Siddha
This is mainly needed for EM64T platforms and makes sense for ia64 too.
Need of this was broughtup sometime(long time?) back on lkml.
http://www.ussg.iu.edu/hypermail/linux/kernel/0406.3/0112.html
Keith Owens [Wed, 20 Oct 2004 06:39:59 +0000 (06:39 +0000)]
[IA64] Avoid a rare deadlock during unwind
There is a rare deadlock condition during unwind script creation. If
build_script() is interrupted in the middle of creating the script, it
holds the script write lock. If the interrupt handler needs to call
unwind for some failure condition, unwind will try to read the
incomplete script and will deadlock on the script lock.
The fix is to disable interrupts while building the script, so
interrupt handlers never see partial scripts.
Promoting spin_lock_irqsave() from script_new() to find_save_locs()
changes the indentation, so the patch looks bigger than it really is.
Signed-off-by: Keith Owens <kaos@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
The orphan list holds inodes that need to be truncated on recovery. In the
O_DIRECT case, it's used if we extend the inode --- the truncate on recovery
means we'll recover the newly-allocated disk blocks if we crash after the IO
starts but before i_size is updated on disk.
Now, the orphan list is *also* used to delete inodes that are unlinked but
still-open. Those get truncated but also deleted on recovery.
The orphan list is held both in memory and on disk. So the rules are that the
inode can't be reclaimed while on the orphan list. There are only two cases
--- either the inode is actively being written(O_DIRECT) or truncated (in
which case the inode is by definition not going to be reused), or it's
unlinked but still open (again, non-reclaimable).
But in the case where you're truncating or write(O_DIRECT)ing a file that is
*ALSO* unlinked, there's a problem --- the final unlink would put the inode on
the orphan list, but the write/truncate would try to add/remove it. End
result is that the inode disappears from the orphan list while it's still
unlinked-but-in-use.
That's just a leak-on-crash, it's not going to be detectable in normal use.
But it's still a bug, and the way we fix it is for direct-IO and truncate not
to do the ext3_orphan_del if the file is unlinked (ie. i_nlink==0).
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] nfs4 lease: separate the lease processsing code
nfsd will not have a file descriptor, nor an owner on the filp. nfsd also
will not use signals. Seperate the lease processsing coe from
fcntl_setlease() into a __setlease() call.
Signed-off-by: Andy Adamson <andros@citi.umich.edu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>