aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-04-12NetLabel: Allow passing the LSM domain as a shared pointerPaul Moore
Smack doesn't have the need to create a private copy of the LSM "domain" when setting NetLabel security attributes like SELinux, however, the current NetLabel code requires a private copy of the LSM "domain". This patches fixes that by letting the LSM determine how it wants to pass the domain value. * NETLBL_SECATTR_DOMAIN_CPY The current behavior, NetLabel assumes that the domain value is a copy and frees it when done * NETLBL_SECATTR_DOMAIN New, Smack-friendly behavior, NetLabel assumes that the domain value is a reference to a string managed by the LSM and does not free it when done Signed-off-by: Paul Moore <paul.moore@hp.com> Acked-by: James Morris <jmorris@namei.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-12[AF_UNIX]: Use SEQ_START_TOKENJoe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-12MAINTAINERS: New sctp mailing listVlad Yasevich
Add a new sctp mailing list linux-sctp@vger.kernel.org. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-12[SCTP]: Remove an unused parameter from sctp_cmd_hb_timer_updateGui Jianfeng
The 'asoc' parameter to sctp_cmd_hb_timer_update() is unused, and we can remove it. Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-12[SCTP]: "list_for_each()" -> "list_for_each_entry()" where appropriate.Robert P. J. Day
Replacing (almost) all invocations of list_for_each() with list_for_each_entry() tightens up the code and allows for the deletion of numerous list iterator variables that are no longer necessary. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-12[SCTP]: Correct /proc/net/assocs formatting errorNeil Horman
Recently I posted a patch to add some informational items to /proc/net/sctp/assocs. All the information is correct, but because of how the seqfile show operation is laid out, some of the formatting is backwards. This patch corrects that formatting, so that the new information appears at the end of each line, rather than in the middle. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-10IPV4: use xor rather than multiple ands for route compareStephen Hemminger
The comparison in ip_route_input is a hot path, by recoding the C "and" as bit operations, fewer conditional branches get generated so the code should be faster. Maybe someday Gcc will be smart enough to do this? Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-10[SCTP]: Use snmp_mib_{init,free}().YOSHIFUJI Hideaki
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-10[DCCP]: Use snmp_mib_{init,free}().YOSHIFUJI Hideaki
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-10ipv4: fib_trie leaf free optimizationStephen Hemminger
Avoid unneeded test in the case where object to be freed has to be a leaf. Don't need to use the generic tnode_free() function, instead just setup leaf to be freed. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-10ipv4: fib_trie remove unused argumentStephen Hemminger
The trie pointer is passed down to flush_list and flush_leaf but never used. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-10[ATM]: Use SEQ_START_TOKENJoe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-10[Syncookies]: Add support for TCP options via timestamps.Florian Westphal
Allow the use of SACK and window scaling when syncookies are used and the client supports tcp timestamps. Options are encoded into the timestamp sent in the syn-ack and restored from the timestamp echo when the ack is received. Based on earlier work by Glenn Griffin. This patch avoids increasing the size of structs by encoding TCP options into the least significant bits of the timestamp and by not using any 'timestamp offset'. The downside is that the timestamp sent in the packet after the synack will increase by several seconds. changes since v1: don't duplicate timestamp echo decoding function, put it into ipv4/syncookie.c and have ipv6/syncookies.c use it. Feedback from Glenn Griffin: fix line indented with spaces, kill redundant if () Reviewed-by: Hagen Paul Pfeifer <hagen@jauu.net> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-10IPV4: fib_trie use vmalloc for large tnodesStephen Hemminger
Use vmalloc rather than alloc_pages to avoid wasting memory. The problem is that tnode structure has a power of 2 sized array, plus a header. So the current code wastes almost half the memory allocated because it always needs the next bigger size to hold that small header. This is similar to an earlier patch by Eric, but instead of a list and lock, I used a workqueue to handle the fact that vfree can't be done in interrupt context. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-10[IPV6]: Remove unused declarations in include/net/ip6_route.h.Rami Rosen
1) Standlaone ip6_null_entry is no longer needed as it is replaced by the ip6_null_entry member of ipv6 (instance of struct netns_ipv6) in struct net (as a result of Network Namespaces patches). 2) These 3 methods from this same header are not defined anywhere: ip6_rt_addr_add(), ip6_rt_addr_del(), rt6_sndmsg() Signed-off-by: Rami Rosen <ramirose@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-10iucv: Delay bus registration until core is ready.Cornelia Huck
If we register the iucv bus after the infrastructure is ready, userspace can start relying on it when it receives the uevent for the bus. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-10iucv: get rid of in_atomic() use.Heiko Carstens
This BUG_ON is not needed, since all (debug) checks are also done in smp_call_function() which gets called by this function. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-10af_iucv: Use non-deprecated __RW_LOCK_UNLOCKED macro.Robert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-10[SKFILTER]: Add SKF_ADF_NLATTR instructionPatrick McHardy
SKF_ADF_NLATTR searches for a netlink attribute, which avoids manually parsing and walking attributes. It takes the offset at which to start searching in the 'A' register and the attribute type in the 'X' register and returns the offset in the 'A' register. When the attribute is not found it returns zero. A top-level attribute can be located using a filter like this (example for nfnetlink, using struct nfgenmsg): ... { /* A = offset of first attribute */ .code = BPF_LD | BPF_IMM, .k = sizeof(struct nlmsghdr) + sizeof(struct nfgenmsg) }, { /* X = CTA_PROTOINFO */ .code = BPF_LDX | BPF_IMM, .k = CTA_PROTOINFO, }, { /* A = netlink attribute offset */ .code = BPF_LD | BPF_B | BPF_ABS, .k = SKF_AD_OFF + SKF_AD_NLATTR }, { /* Exit if not found */ .code = BPF_JMP | BPF_JEQ | BPF_K, .k = 0, .jt = <error> }, ... A nested attribute below the CTA_PROTOINFO attribute would then be parsed like this: ... { /* A += sizeof(struct nlattr) */ .code = BPF_ALU | BPF_ADD | BPF_K, .k = sizeof(struct nlattr), }, { /* X = CTA_PROTOINFO_TCP */ .code = BPF_LDX | BPF_IMM, .k = CTA_PROTOINFO_TCP, }, { /* A = netlink attribute offset */ .code = BPF_LD | BPF_B | BPF_ABS, .k = SKF_AD_OFF + SKF_AD_NLATTR }, ... The data of an attribute can be loaded into 'A' like this: ... { /* X = A (attribute offset) */ .code = BPF_MISC | BPF_TAX, }, { /* A = skb->data[X + k] */ .code = BPF_LD | BPF_B | BPF_IND, .k = sizeof(struct nlattr), }, ... Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-10[IPV6] Remove three method declarations in include/net/ndisc.h.Rami Rosen
This patch removes two unused method declarations in include/net/ndisc.h: ndisc_forwarding_on(void) and ndisc_forwarding_off(void); Also igmp6_cleanup(void) appears twice in this header, so one igmp6_cleanup(void) declaration is removed. Signed-off-by: Rami Rosen <ramirose@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-10SCTP: Remove useless assignment from __sctp_rcv_lookup_endpointGui Jianfeng
Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-10SCTP: fix wrong debug counting of bind_bucketLi Zefan
Should not count it if the allocation of the object is failed. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-10SCTP: fix wrong debug counting of datamsgLi Zefan
Should not count it if the allocation of this object failed. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-10IPV4: route rekey timer can be deferrableStephen Hemminger
No urgency on the rehash interval timer, so mark it as deferrable. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-10IPV4: route use jhash3Stephen Hemminger
Since route hash is a triple, use jhash_3words rather doing the mixing directly. This should be as fast and give better distribution. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-10IPV4: route inline changesStephen Hemminger
Don't mark functions that are large as inline, let compiler decide. Also, use inline rather than __inline__. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-10socket: sk_filter deinlineStephen Hemminger
The sk_filter function is too big to be inlined. This saves 2296 bytes of text on allyesconfig. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-10socket: sk_filter minor cleanupsStephen Hemminger
Some minor style cleanups: * Move __KERNEL__ definitions to one place in filter.h * Use const for sk_filter_len * Line wrapping * Put EXPORT_SYMBOL next to function definition Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-08mac80211: fix key debugfs default_key linkJohannes Berg
The default_key symlink points to the key index rather than they key counter, fix it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08drivers/net/wireless/p54/net2280.h: silence checkpatch.plChristian Lamparter
Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08p54: move to separate directoryChristian Lamparter
Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08mac80211: rename filesJohannes Berg
This patch renames all mac80211 files (except ieee80211_i.h) to get rid of the useless ieee80211_ prefix. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08mac80211: fix key vs. sta locking problemsJohannes Berg
Up to now, key manipulation is supposed to run under RTNL to avoid concurrent manipulations and also allow the set_key() hardware callback to sleep. This is not feasible because STA structs are rcu-protected and thus a lot of operations there cannot take the RTNL. Also, key references are rcu-protected so we cannot do things atomically. This patch changes key locking completely: * key operations are now atomic * hardware crypto offload is enabled and disabled from a workqueue, due to that key freeing is also delayed * debugfs code is also run from a workqueue * keys reference STAs (and vice versa!) so during STA unlink the STAs key reference is removed but not the keys STA reference, to avoid races key todo work is run before STA destruction. * fewer STA operations now need the RTNL which was required due to key operations This fixes the locking problems lockdep pointed out and also makes things more light-weight because the rtnl isn't required as much. Note that the key todo lock/key mutex are global locks, this is not required, of course, they could be per-hardware instead. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08mac80211: fix sta-info pinningJohannes Berg
When a STA is supposed to be unlinked but is pinned, it still needs to be unlinked from all structures. Only at the end of the unlink process should we check for pin status and invalidate the callers reference if it is pinned. Move the pin status check down. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08mac80211: fix defined but not usedJiri Slaby
These two symbols are used only in ifdeffed function. Move them to that section too. net/mac80211/sta_info.c:387: warning: `__sta_info_pin' defined but not used net/mac80211/sta_info.c:397: warning: `__sta_info_unpin' defined but not used Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Michael Wu <flamingice@sourmilk.net> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Jiri Benc <jbenc@suse.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08adm8211: remove commented-out codePavel Machek
Remove some commented-out code from adm8211. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08mac80211: BA session debug prints changesRon Rindjunsky
This patch contains next issues: 1 - prevents "stop BA session" multiple warnings 2 - adds debug print to stop Rx BA session flow 3 - adds EOL in one debug print Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08b43: use b43_is_mode() callMichael Buesch
We must use the b43_is_mode() call to check the current interface operation mode. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08b43: Fix PHY TX control words in SHMMichael Buesch
This fixes the initialization of the PHY TX control words in shared memory. These control words are used for management frames like beacons. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08b43: Fix beacon BH updateMichael Buesch
This fixes beacon updating in the bottomhalf. In case the device is busy, we will defer to later in the IRQ handler. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08mac80211: notify mac from low level driver (iwlwifi)Mohamed Abbas
Add new API to MAC80211 to allow low level driver to notify MAC with driver status. Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08mac80211: fix ieee80211_ioctl_giwrateJohannes Berg
The ieee80211_ioctl_giwrate() ioctl handler doesn't rcu_read_lock() its access to the sta table, fix it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08mac80211: make debugfs files root-onlyJohannes Berg
Unfortunately, debugfs can be made to access invalid memory by open()ing a file and then waiting until the corresponding debugfs file has been removed (and, probably, the underlying object.) That could be exploited by any user if the user is able to open debugfs files and can cause networking devices, STA entries or similar to disappear which is quite easy to do. Hence, all debugfs files should be root-only. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08b43: Beaconing fixesMichael Buesch
These are some beaconing related fixes. Basically it prevents the card from triggering the beacon IRQ over and over again. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08iwlwifi: honour regulatory restrictions in scan codeJohannes Berg
When doing firmware-assisted scanning, iwlwifi drivers do not honour the regulatory control code that might disable channels that are enabled in the EEPROM, for example when the user is visiting another country and adjusted the regulatory domain accordingly. This patch fixes that. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08mac80211: notify upper layers after lowerReinette Chatre
When drivers receive change notification they may do work that will enable the changes to take effect. For example, if new association the device needs to be programmed with this information. Give the driver chance to make the changes before notifying the upper layer - thus preventing race condition where upper layer attempts to utilize state that may not be configured yet. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08iwlwifi: fix rfkill memory errorMohamed Abbas
Do not free reference to device twice. After rfkill registration succeeds we only need to call rfkill_unregister() and not rfkill_free(). Also add some debugging. Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08iwlwifi: ensure led registration complete as part of initializationReinette Chatre
After the workqueue is notified the LED code may be accessed. Ensure that LED registration completes completely as part of initialization before anything waiting on this is notified. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08iwlwifi: use ieee80211_frequency_to_channelTomas Winkler
This patch replaces ieee80211chan2mhz from radiotap with ieee80211_frequency_to_channel provided by mac80211 Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08iwlwifi: move driver status inliners into iwl-core.hTomas Winkler
This patch moves inline functions into iwl-core.h Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>