summaryrefslogtreecommitdiff
path: root/net
AgeCommit message (Collapse)Author
2011-12-16Squashandroid-20111223Benn Pörscke
Change-Id: I2fcf46d1fc4b0cd4c61e5be3654c43b80db86015
2011-10-28cfg80211: really ignore the regulatory requestSven Neumann
commit a203c2aa4cefccb879c879b8e1cad1a09a679e55 upstream. At the beginning of wiphy_update_regulatory() a check is performed whether the request is to be ignored. Then the request is sent to the driver nevertheless. This happens even if last_request points to NULL, leading to a crash in the driver: [<bf01d864>] (lbs_set_11d_domain_info+0x28/0x1e4 [libertas]) from [<c03b714c>] (wiphy_update_regulatory+0x4d0/0x4f4) [<c03b714c>] (wiphy_update_regulatory+0x4d0/0x4f4) from [<c03b4008>] (wiphy_register+0x354/0x420) [<c03b4008>] (wiphy_register+0x354/0x420) from [<bf01b17c>] (lbs_cfg_register+0x80/0x164 [libertas]) [<bf01b17c>] (lbs_cfg_register+0x80/0x164 [libertas]) from [<bf020e64>] (lbs_start_card+0x20/0x88 [libertas]) [<bf020e64>] (lbs_start_card+0x20/0x88 [libertas]) from [<bf02cbd8>] (if_sdio_probe+0x898/0x9c0 [libertas_sdio]) Fix this by returning early. Also remove the out: label as it is not any longer needed. Signed-off-by: Sven Neumann <s.neumann@raumfeld.com> Cc: linux-wireless@vger.kernel.org Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Daniel Mack <daniel@zonque.org> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Change-Id: Ifaf066061c02b6ec1cfc6c9c491575d4978bfa60 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35663 Tested-by: Per VAHLNE <per.xx.vahlne@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2011-10-28svcrpc: fix list-corrupting race on nfsd shutdownJ. Bruce Fields
commit ebc63e531cc6a457595dd110b07ac530eae788c3 upstream. After commit 3262c816a3d7fb1eaabce633caa317887ed549ae "[PATCH] knfsd: split svc_serv into pools", svc_delete_xprt (then svc_delete_socket) no longer removed its xpt_ready (then sk_ready) field from whatever list it was on, noting that there was no point since the whole list was about to be destroyed anyway. That was mostly true, but forgot that a few svc_xprt_enqueue()'s might still be hanging around playing with the about-to-be-destroyed list, and could get themselves into trouble writing to freed memory if we left this xprt on the list after freeing it. (This is actually functionally identical to a patch made first by Ben Greear, but with more comments.) Cc: gnb@fmeh.org Reported-by: Ben Greear <greearb@candelatech.com> Tested-by: Ben Greear <greearb@candelatech.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Change-Id: I3419205796df3312af380b6e183695e3a65af6e0 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35656 Tested-by: Per VAHLNE <per.xx.vahlne@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2011-10-28mac80211: Restart STA timers only on associated stateRajkumar Manoharan
commit 676b58c27475a9defccc025fea1cbd2b141ee539 upstream. A panic was observed when the device is failed to resume properly, and there are no running interfaces. ieee80211_reconfig tries to restart STA timers on unassociated state. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Change-Id: Ieab38e91ba93b6829bc0d1537e4121f953c646b2 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35613 Tested-by: Per VAHLNE <per.xx.vahlne@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2011-10-28ethtool: Allow zero-length register dumps againBen Hutchings
commit 67ae7cf1eeda777f79259c4c6cb17a0bd28dee71 upstream. Some drivers (ab)use the ethtool_ops::get_regs operation to expose only a hardware revision ID. Commit a77f5db361ed9953b5b749353ea2c7fed2bf8d93 ('ethtool: Allocate register dump buffer with vmalloc()') had the side-effect of breaking these, as vmalloc() returns a null pointer for size=0 whereas kmalloc() did not. For backward-compatibility, allow zero-length dumps again. Reported-by: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Change-Id: Iac59f6b9d382c1b185492bf92d90eccc9bd16826 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35607 Tested-by: Per VAHLNE <per.xx.vahlne@stericsson.com> Reviewed-by: QABUILD Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2011-10-28bridge: send proper message_age in config BPDUstephen hemminger
commit 0c03150e7ea8f7fcd03cfef29385e0010b22ee92 upstream. A bridge topology with three systems: +------+ +------+ | A(2) |--| B(1) | +------+ +------+ \ / +------+ | C(3) | +------+ What is supposed to happen: * bridge with the lowest ID is elected root (for example: B) * C detects that A->C is higher cost path and puts in blocking state What happens. Bridge with lowest id (B) is elected correctly as root and things start out fine initially. But then config BPDU doesn't get transmitted from A -> C. Because of that the link from A-C is transistioned to the forwarding state. The root cause of this is that the configuration messages is generated with bogus message age, and dropped before sending. In the standardmessage_age is supposed to be: the time since the generation of the Configuration BPDU by the Root that instigated the generation of this Configuration BPDU. Reimplement this by recording the timestamp (age + jiffies) when recording config information. The old code incorrectly used the time elapsed on the ageing timer which was incorrect. See also: https://bugzilla.vyatta.com/show_bug.cgi?id=7164 Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Change-Id: I09afcb8a4fb21bca030e8f10a706fe7fafe14438 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35583 Tested-by: Per VAHLNE <per.xx.vahlne@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2011-10-28ipv6: updates to privacy addresses per RFC 4941JP Abgrall
Update the code to handle some of the differences between RFC 3041 and RFC 4941, which obsoletes it. Also a couple of janitorial fixes. - Allow router advertisements to increase the lifetime of temporary addresses. This was not allowed by RFC 3041, but is specified by RFC 4941. It is useful when RA lifetimes are lower than TEMP_{VALID,PREFERRED}_LIFETIME: in this case, the previous code would delete or deprecate addresses prematurely. - Change the default of MAX_RETRY to 3 per RFC 4941. - Add a comment to clarify that the preferred and valid lifetimes in inet6_ifaddr are relative to the timestamp. - Shorten lines to 80 characters in a couple of places. Change-Id: I4da097664d4b1de7c1cebf410895319601c7f1cc Signed-off-by: Lorenzo Colitti <lorenzo@google.com> Signed-off-by: JP Abgrall <jpa@google.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35579 Tested-by: Per VAHLNE <per.xx.vahlne@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2011-10-28Bluetooth: l2cap: Fix lost wakeup waiting for ERTM acksPeter Hurley
Fix race condition which can result in missing wakeup during l2cap socket shutdown. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Change-Id: I8797d086ebbc222ec468bb5b5ac7335b826f64e9 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35569 Tested-by: Per VAHLNE <per.xx.vahlne@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2011-10-28Bluetooth: bnep: Fix lost wakeup of session threadPeter Hurley
Fix race condition which can result in missing the wakeup intended to stop the session thread. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Change-Id: I7047dfb72066d726d04f6ca97f2fada70339fdaa Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35568 Tested-by: Per VAHLNE <per.xx.vahlne@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2011-10-28Bluetooth: sco: Fix lost wakeups waiting to accept socketPeter Hurley
Fix race conditions which can cause lost wakeups (or missed signals) while waiting to accept a sco socket connection. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Change-Id: I905dbb0c2ab840960fc420b30fb5a8032afb8c9e Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35567 Tested-by: Per VAHLNE <per.xx.vahlne@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2011-10-28Bluetooth: l2cap: Fix lost wakeups waiting to accept socketPeter Hurley
Fix race conditions which can cause lost wakeups (or misssed signals) while waiting to accept an l2cap socket connection. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Change-Id: I71c320d161dfbb2bf45f2b2ccbcc2c30f7507558 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35566 Tested-by: Per VAHLNE <per.xx.vahlne@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2011-10-28Bluetooth: Fix lost wakeups waiting for sock state changePeter Hurley
Fix race conditions which can cause lost wakeups while waiting for sock state to change. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Change-Id: Ida23c4881653c90354bff85984d969cc5b323dba Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35565 Tested-by: Per VAHLNE <per.xx.vahlne@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2011-10-28Bluetooth: rfcomm: Fix lost wakeups waiting to accept socketPeter Hurley
Fix race conditions which can cause lost wakeups (or missed signals) while waiting to accept an rfcomm socket connection. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Change-Id: Iafe477372e4dcf4a4519cc79ff61bc457c3d8642 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35564 Tested-by: Per VAHLNE <per.xx.vahlne@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2011-10-28Bluetooth: rfcomm: Remove unnecessary krfcommd eventPeter Hurley
Removed superfluous event handling which was used to signal that the rfcomm kthread had been woken. This appears to have been used to prevent lost wakeups. Correctly ordering when the task state is set to TASK_INTERRUPTIBLE is sufficient to prevent lost wakeups. To prevent wakeups which occurred prior to initially setting TASK_INTERRUPTIBLE from being lost, the main work of the thread loop - rfcomm_process_sessions() - is performed prior to sleeping. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Change-Id: I03b9763f014b9bb243c3ff83828029d9f72e70d0 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35563 Tested-by: Per VAHLNE <per.xx.vahlne@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2011-10-18Bluetooth: rfcomm: Fix sleep in invalid context in rfcomm_security_cfmSzymon Janc
This was triggered by turning off encryption on ACL link when rfcomm was using high security. rfcomm_security_cfm (which is called from rx task) was closing DLC and this involves sending disconnect message (and locking socket). Move closing DLC to rfcomm_process_dlcs and only flag DLC for closure in rfcomm_security_cfm. BUG: sleeping function called from invalid context at net/core/sock.c:2032 in_atomic(): 1, irqs_disabled(): 0, pid: 1788, name: kworker/0:3 [<c0068a08>] (unwind_backtrace+0x0/0x108) from [<c05e25dc>] (dump_stack+0x20/0x24) [<c05e25dc>] (dump_stack+0x20/0x24) from [<c0087ba8>] (__might_sleep+0x110/0x12c) [<c0087ba8>] (__might_sleep+0x110/0x12c) from [<c04801d8>] (lock_sock_nested+0x2c/0x64) [<c04801d8>] (lock_sock_nested+0x2c/0x64) from [<c05670c8>] (l2cap_sock_sendmsg+0x58/0xcc) [<c05670c8>] (l2cap_sock_sendmsg+0x58/0xcc) from [<c047cf6c>] (sock_sendmsg+0xb0/0xd0) [<c047cf6c>] (sock_sendmsg+0xb0/0xd0) from [<c047cfc8>] (kernel_sendmsg+0x3c/0x44) [<c047cfc8>] (kernel_sendmsg+0x3c/0x44) from [<c056b0e8>] (rfcomm_send_frame+0x50/0x58) [<c056b0e8>] (rfcomm_send_frame+0x50/0x58) from [<c056b168>] (rfcomm_send_disc+0x78/0x80) [<c056b168>] (rfcomm_send_disc+0x78/0x80) from [<c056b9f4>] (__rfcomm_dlc_close+0x2d0/0x2fc) [<c056b9f4>] (__rfcomm_dlc_close+0x2d0/0x2fc) from [<c056bbac>] (rfcomm_security_cfm+0x140/0x1e0) [<c056bbac>] (rfcomm_security_cfm+0x140/0x1e0) from [<c0555ec0>] (hci_event_packet+0x1ce8/0x4d84) [<c0555ec0>] (hci_event_packet+0x1ce8/0x4d84) from [<c0550380>] (hci_rx_task+0x1d0/0x2d0) [<c0550380>] (hci_rx_task+0x1d0/0x2d0) from [<c009ee04>] (tasklet_action+0x138/0x1e4) [<c009ee04>] (tasklet_action+0x138/0x1e4) from [<c009f21c>] (__do_softirq+0xcc/0x274) [<c009f21c>] (__do_softirq+0xcc/0x274) from [<c009f6c0>] (do_softirq+0x60/0x6c) [<c009f6c0>] (do_softirq+0x60/0x6c) from [<c009f794>] (local_bh_enable_ip+0xc8/0xd4) [<c009f794>] (local_bh_enable_ip+0xc8/0xd4) from [<c05e5804>] (_raw_spin_unlock_bh+0x48/0x4c) [<c05e5804>] (_raw_spin_unlock_bh+0x48/0x4c) from [<c040d470>] (data_from_chip+0xf4/0xaec) [<c040d470>] (data_from_chip+0xf4/0xaec) from [<c04136c0>] (send_skb_to_core+0x40/0x178) [<c04136c0>] (send_skb_to_core+0x40/0x178) from [<c04139f4>] (cg2900_hu_receive+0x15c/0x2d0) [<c04139f4>] (cg2900_hu_receive+0x15c/0x2d0) from [<c0414cb8>] (hci_uart_tty_receive+0x74/0xa0) [<c0414cb8>] (hci_uart_tty_receive+0x74/0xa0) from [<c02cbd9c>] (flush_to_ldisc+0x188/0x198) [<c02cbd9c>] (flush_to_ldisc+0x188/0x198) from [<c00b2774>] (process_one_work+0x144/0x4b8) [<c00b2774>] (process_one_work+0x144/0x4b8) from [<c00b2e8c>] (worker_thread+0x198/0x468) [<c00b2e8c>] (worker_thread+0x198/0x468) from [<c00b9bc8>] (kthread+0x98/0xa0) [<c00b9bc8>] (kthread+0x98/0xa0) from [<c0061744>] (kernel_thread_exit+0x0/0x8) Change-Id: Iaa50763772d31b0ae506fc993f1c46e02323f6b2 Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34153 Reviewed-by: Lukasz RYMANOWSKI <lukasz.rymanowski@stericsson.com> Reviewed-by: Ulrik LAUREN <ulrik.lauren@stericsson.com>
2011-09-22CAIF : coverity issuesDurga Prasada Rao BATHINA
free phy_driver memory and initialize linkid to 0. ST-Ericsson ID: 358047 ST-Ericsson Linux next: NA ST-Ericsson FOSS-OUT ID: NA Change-Id: Icb295648b23bd836b9f5a40a0b605e4792a8511d Signed-off-by: Durga Prasada Rao BATHINA <durgaprasadarao.b@stericcson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31751 Reviewed-by: Bibek BASU <bibek.basu@stericsson.com> Tested-by: Bibek BASU <bibek.basu@stericsson.com>
2011-09-19Phonet: Insert correct dest addr and port for TCP/IP data on U8500Hemant Ramdasi
Inserts correct dest addr and port for the TCP/IP data on ST-Ericsson U8500. This is required due to lack of Pipe controller implementation in ST-Ericsson U8500 Modem Signed-off-by: Hemant Ramdasi <hemant.ramdasi@stericsson.com> Change-Id: I3c199cc94da3b81de3ab97f22b6e7087b2cd0071 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31273
2011-09-19Revert "caif: Bugfix use for_each_safe when removing list nodes."Hemant Ramdasi
This reverts commit 8b7b286d853032b485de9753c3908c300266c660. Refer 0c184ed9032c58b21f0d90de28c796874b73d6a1 for original commit. Signed-off-by: Hemant Ramdasi <hemant.ramdasi@stericsson.com> Change-Id: Iaa8c88ed05d24bdfb3c7b505cc1342c088cdfd51 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30328
2011-09-19Revert "caif fix merge problems merge with org commit."Hemant Ramdasi
This reverts commit 4e5176a567166769c29a39f66959b81efae11e47. Signed-off-by: Hemant Ramdasi <hemant.ramdasi@stericsson.com> Change-Id: I66de7f9a713c056ce974355e6c28feac2282aec7 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30327
2011-09-19bluetooth: Add SCO parameters support for socketAndrzej Kaczmarek
Adds ability to setup SCO connection parameters through socket option. ST-Ericsson Linux next: Not tested, ER 256277 ST-Ericsson ID: 256277 ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-10137 Change-Id: If859341019fd9f7cc7c0efe95750779e84fac801 Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30136 Reviewed-by: Par-Gunnar HJALMDAHL <par-gunnar.p.hjalmdahl@stericsson.com> Tested-by: Par-Gunnar HJALMDAHL <par-gunnar.p.hjalmdahl@stericsson.com> Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
2011-09-19WLAN: Fix build error for u5500 and u9500Bartosz Markowski
Kconfig for OpenMAC is added to net/Kconfig to fix build error of u5500 and u9500 ST-Ericsson Linux next: NA ST-Ericsson ID: 356912 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Iedfa4e9148433bf052a4dbd979f696952ebde295 Signed-off-by: Tomasz Hliwiak <tomasz.hliwiak@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/29031 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-by: QATOOLS Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com> Tested-by: Rabin VINCENT <rabin.vincent@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30005 Tested-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com>
2011-09-19WLAN: OpenMAC deliveryBartosz Markowski
This patch add internal support for openMAC driver from compat-wireless-openmac git. Internal only, for customer deliveries changes should be made in defconfig and Kconfig accordingly to what's done now via script called from Android.mk Only one (UMAC or openMAC based) solution should be delivered to customers. ST-Ericsson ID: 355582 ST-Ericsson FOSS-OUT ID: Trivial ST-Ericsson Linux next: NA Change-Id: Idd0081cc327faf64131f29a3f3a54fd6d670acf2 Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/28667 Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30004
2011-09-19WLAN: Add symlink to compat-wirelessBartosz Markowski
And disable use of wireless from kernel tree if compat-wireless is enabled. Depends-On: I7147b541419c684dc337e5d32b021b470dd0f344, Ib489e754a7cf4bd79ce20955be61cae7958043e1, Id8d0913143e58a21dbfebe187a9594a0cb7bea8a, Ieaadb213c53d967ab5dcb293aeee088fd3efbae8, Ie280d1b7e533d7045e4e77c0cab3d69f1180c091, Ia40a0c011f35c3056d02d12b054f93aa86d99b47, Ib3b5524ec3814b00a7e46f591d7715db16eec5fd ST-Ericsson Linux next: - ST-Ericsson ID: CR283174 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I28a1b6b32383e71f9679031bffcefff022eaadde Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/16241 Tested-by: Mariusz CZAPLICKI <mariusz.czaplicki@tieto.com> Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30002 Tested-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com>
2011-09-19bluetooth: Improve BNEP extension headers handlingAndrzej Kaczmarek
Adds handling of extension headers to BNEP control packets. Adds support for BNEP setup connection request handled in pand. ST-Ericsson Linux next: - ST-Ericsson ID: 328144 ST-Ericsson FOSS-OUT-ID: Trivial Depends-On: Id2cbd106af9b380f63d87ea0b4652ec6cd996fa4 Change-Id: I005e00e2fe934dc19f40533953d5b233676f0d0e Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/18117 Reviewed-by: Par-Gunnar HJALMDAHL <par-gunnar.p.hjalmdahl@stericsson.com> Reviewed-by: Lukasz RYMANOWSKI <lukasz.rymanowski@stericsson.com> Reviewed-by: Henrik POSSUNG <henrik.possung@stericsson.com>
2011-09-19Merge linux-linaro-3.0-2011.07-1-android-1 into..Ulf Hansson
..linux-linaro-3.0-2011.07-1_glk3.0 Conflicts: arch/arm/common/Makefile drivers/misc/Kconfig drivers/misc/Makefile kernel/printk.c Change-Id: I126f34edb1879981909072beefb2738cad26f951
2011-09-19caif fix merge problems merge with org commit.Robert Marklund
Signed-off-by: Robert Marklund <robert.marklund@stericsson.com>
2011-09-19caif: Bugfix use for_each_safe when removing list nodes.Sjur Brændeland
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net> Change-Id: I7fec5eb6d17e01a87e89c2e7adec72d2f8babf83 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/21520 Reviewed-by: Erwan BRACQ <erwan.bracq@stericsson.com> Tested-by: Erwan BRACQ <erwan.bracq@stericsson.com> Reviewed-by: QATEST Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
2011-07-25Merge branch 'upstream/linaro-3.0' into linaro-android-3.0John Stultz
2011-07-22netfilter: qtaguid: disable #define DEBUGJP Abgrall
This would cause log spam to the point of slowing down the system. Change-Id: I5655f0207935004b0198f43ad0d3c9ea25466e4e Signed-off-by: JP Abgrall <jpa@google.com>
2011-07-21netfilter: xt_qtaguid: add uid permission checks during ctrl/stats accessJP Abgrall
* uid handling - Limit UID impersonation to processes with a gid in AID_NET_BW_ACCT. This affects socket tagging, and data removal. - Limit stats lookup to own uid or the process gid is in AID_NET_BW_STATS. This affects stats lookup. * allow pacifying the module Setting passive to Y/y will make the module return immediately on external stimulus. No more stats and silent success on ctrl writes. Mainly used when one suspects this module of misbehaving. Change-Id: I83990862d52a9b0922aca103a0f61375cddeb7c4 Signed-off-by: JP Abgrall <jpa@google.com>
2011-07-21netfilter: qtaguid: add tag delete command, expand stats output.JP Abgrall
* Add a new ctrl command to delete stored data. d <acct_tag> [<uid>] The uid will default to the running process's. The accounting tag can be 0, in which case all counters and socket tags associated with the uid will be cleared. * Simplify the ctrl command handling at the expense of duplicate code. This should make it easier to maintain. * /proc/net/xt_qtaguid/stats now returns more stats idx iface acct_tag_hex uid_tag_int {rx,tx}_{bytes,packets} {rx,tx}_{tcp,udp,other}_{bytes,packets} the {rx,tx}_{bytes,packets} are the totals. * re-tagging will now allow changing the uid. Change-Id: I9594621543cefeab557caa3d68a22a3eb320466d Signed-off-by: JP Abgrall <jpa@google.com>
2011-07-21netfilter: quota2: add support to log quota limit reached.JP Abgrall
This uses the NETLINK NETLINK_NFLOG family to log a single message when the quota limit is reached. It uses the same packet type as ipt_ULOG, but - never copies skb data, - uses 112 as the event number (ULOG's +1) It doesn't log if the module param "event_num" is 0. Change-Id: I6f31736b568bb31a4ff0b9ac2ee58380e6b675ca Signed-off-by: JP Abgrall <jpa@google.com>
2011-07-19Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: ceph: fix file mode calculation
2011-07-19ceph: fix file mode calculationSage Weil
open(2) must always include one of O_RDONLY, O_WRONLY, or O_RDWR. No need for any O_APPEND special case. Passing O_WRONLY|O_RDWR is undefined according to the man page, but the Linux VFS interprets this as O_RDWR, so we'll do the same. This fixes open(2) with flags O_RDWR|O_APPEND, which was incorrectly being translated to readonly. Reported-by: Fyodor Ustinov <ufm@ufm.su> Signed-off-by: Sage Weil <sage@newdream.net>
2011-07-18Bluetooth: Fix crash with incoming L2CAP connectionsIlia Kolomisnky
Another regression fix considering incomming l2cap connections with defer_setup enabled. In situations when incomming connection is extracted with l2cap_sock_accept, it's bt_sock info will have 'parent' member zerroed, but 'parent' may be used unconditionally in l2cap_conn_start() and l2cap_security_cfm() when defer_setup is enabled. Backtrace: [<bf02d5ac>] (l2cap_security_cfm+0x0/0x2ac [bluetooth]) from [<bf01f01c>] (hci_event_pac ket+0xc2c/0x4aa4 [bluetooth]) [<bf01e3f0>] (hci_event_packet+0x0/0x4aa4 [bluetooth]) from [<bf01a844>] (hci_rx_task+0x cc/0x27c [bluetooth]) [<bf01a778>] (hci_rx_task+0x0/0x27c [bluetooth]) from [<c008eee4>] (tasklet_action+0xa0/ 0x15c) [<c008ee44>] (tasklet_action+0x0/0x15c) from [<c008f38c>] (__do_softirq+0x98/0x130) r7:00000101 r6:00000018 r5:00000001 r4:efc46000 [<c008f2f4>] (__do_softirq+0x0/0x130) from [<c008f524>] (do_softirq+0x4c/0x58) [<c008f4d8>] (do_softirq+0x0/0x58) from [<c008f5e0>] (run_ksoftirqd+0xb0/0x1b4) r4:efc46000 r3:00000001 [<c008f530>] (run_ksoftirqd+0x0/0x1b4) from [<c009f2a8>] (kthread+0x84/0x8c) r7:00000000 r6:c008f530 r5:efc47fc4 r4:efc41f08 [<c009f224>] (kthread+0x0/0x8c) from [<c008cc84>] (do_exit+0x0/0x5f0) Signed-off-by: Ilia Kolomisnky <iliak@ti.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-18Bluetooth: Fix regression in L2CAP connection procedureGustavo F. Padovan
Caused by the following commit, partially revert it. commit 9fa7e4f76f3658ba1f44fbdb95c77e7df3f53f95 Author: Gustavo F. Padovan <padovan@profusion.mobi> Date: Thu Jun 30 16:11:30 2011 -0300 Bluetooth: Fix regression with incoming L2CAP connections PTS test A2DP/SRC/SRC_SET/TC_SRC_SET_BV_02_I revealed that ( probably after the df3c3931e commit ) the l2cap connection could not be established in case when the "Auth Complete" HCI event does not arive before the initiator send "Configuration request", in which case l2cap replies with "Command rejected" since the channel is still in BT_CONNECT2 state. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-18Bluetooth: Fix memory leak under page timeoutsTomas Targownik
If the remote device is not present, the connections attemp fails and the struct hci_conn was not freed Signed-off-by: Tomas Targownik <ttargownik@geicp.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-07-18Bluetooth: Fix regression with incoming L2CAP connectionsGustavo F. Padovan
PTS test A2DP/SRC/SRC_SET/TC_SRC_SET_BV_02_I revealed that ( probably after the df3c3931e commit ) the l2cap connection could not be established in case when the "Auth Complete" HCI event does not arive before the initiator send "Configuration request", in which case l2cap replies with "Command rejected" since the channel is still in BT_CONNECT2 state. Based on patch from: Ilia Kolomisnky <iliak@ti.com> Change-Id: Ifcffe0124adbbc6d1931389ff7476dd0304d6f51 Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-07-18Bluetooth: Fix hidp disconnect deadlocks and lost wakeupPeter Hurley
Partial revert of commit aabf6f89. When the hidp session thread was converted from kernel_thread to kthread, the atomic/wakeups were replaced with kthread_stop. kthread_stop has blocking semantics which are inappropriate for the hidp session kthread. In addition, the kthread signals itself to terminate in hidp_process_hid_control() - it cannot do this with kthread_stop(). Lastly, a wakeup can be lost if the wakeup happens between checking for the loop exit condition and setting the current state to TASK_INTERRUPTIBLE. (Without appropriate synchronization mechanisms, the task state should not be changed between the condition test and the yield - via schedule() - as this creates a race between the wakeup and resetting the state back to interruptible.) Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-07-18Bluetooth: Prevent buffer overflow in l2cap config requestDan Rosenberg
A remote user can provide a small value for the command size field in the command header of an l2cap configuration request, resulting in an integer underflow when subtracting the size of the configuration request header. This results in copying a very large amount of data via memcpy() and destroying the kernel heap. Check for underflow. Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com> Cc: stable <stable@kernel.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-07-16Bluetooth: Fix crash with incoming L2CAP connectionsIlia Kolomisnky
Another regression fix considering incomming l2cap connections with defer_setup enabled. In situations when incomming connection is extracted with l2cap_sock_accept, it's bt_sock info will have 'parent' member zerroed, but 'parent' may be used unconditionally in l2cap_conn_start() and l2cap_security_cfm() when defer_setup is enabled. Backtrace: [<bf02d5ac>] (l2cap_security_cfm+0x0/0x2ac [bluetooth]) from [<bf01f01c>] (hci_event_pac ket+0xc2c/0x4aa4 [bluetooth]) [<bf01e3f0>] (hci_event_packet+0x0/0x4aa4 [bluetooth]) from [<bf01a844>] (hci_rx_task+0x cc/0x27c [bluetooth]) [<bf01a778>] (hci_rx_task+0x0/0x27c [bluetooth]) from [<c008eee4>] (tasklet_action+0xa0/ 0x15c) [<c008ee44>] (tasklet_action+0x0/0x15c) from [<c008f38c>] (__do_softirq+0x98/0x130) r7:00000101 r6:00000018 r5:00000001 r4:efc46000 [<c008f2f4>] (__do_softirq+0x0/0x130) from [<c008f524>] (do_softirq+0x4c/0x58) [<c008f4d8>] (do_softirq+0x0/0x58) from [<c008f5e0>] (run_ksoftirqd+0xb0/0x1b4) r4:efc46000 r3:00000001 [<c008f530>] (run_ksoftirqd+0x0/0x1b4) from [<c009f2a8>] (kthread+0x84/0x8c) r7:00000000 r6:c008f530 r5:efc47fc4 r4:efc41f08 [<c009f224>] (kthread+0x0/0x8c) from [<c008cc84>] (do_exit+0x0/0x5f0) Signed-off-by: Ilia Kolomisnky <iliak@ti.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-16Bluetooth: Fix regression in L2CAP connection procedureGustavo F. Padovan
Caused by the following commit, partially revert it. commit 9fa7e4f76f3658ba1f44fbdb95c77e7df3f53f95 Author: Gustavo F. Padovan <padovan@profusion.mobi> Date: Thu Jun 30 16:11:30 2011 -0300 Bluetooth: Fix regression with incoming L2CAP connections PTS test A2DP/SRC/SRC_SET/TC_SRC_SET_BV_02_I revealed that ( probably after the df3c3931e commit ) the l2cap connection could not be established in case when the "Auth Complete" HCI event does not arive before the initiator send "Configuration request", in which case l2cap replies with "Command rejected" since the channel is still in BT_CONNECT2 state. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-14net: remove NETIF_F_ALL_TX_OFFLOADSMichał Mirosław
There is no software fallback implemented for SCTP or FCoE checksumming, and so it should not be passed on by software devices like bridge or bonding. For VLAN devices, this is different. First, the driver for underlying device should be prepared to get offloaded packets even when the feature is disabled (especially if it advertises it in vlan_features). Second, devices under VLANs do not get replaced without tearing down the VLAN first. This fixes a mess I accidentally introduced while converting bonding to ndo_fix_features. NETIF_F_SOFT_FEATURES are removed from BOND_VLAN_FEATURES because they are unused as of commit 712ae51afd. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-14net: sctp: fix checksum marking for outgoing packetsMichał Mirosław
Packets to devices without NETIF_F_SCTP_CSUM (including NETIF_F_NO_CSUM) should be properly checksummed because the packets can be diverted or rerouted after construction. This still leaves packets diverted from NETIF_F_SCTP_CSUM-enabled devices with broken checksums. Fixing this needs implementing software offload fallback in networking core. For users of sctp_checksum_disable, skb->ip_summed should be left as CHECKSUM_NONE and not CHECKSUM_UNNECESSARY as per include/linux/skbuff.h. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-13Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6Linus Torvalds
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: SUNRPC: Fix use of static variable in rpcb_getport_async NFSv4.1: update nfs4_fattr_bitmap_maxsz SUNRPC: Fix a race between work-queue and rpc_killall_tasks pnfs: write: Set mds_offset in the generic layer - it is needed by all LDs
2011-07-12Merge commit 'v3.0-rc7' into android-3.0Colin Cross
2011-07-12netfitler: fixup the quota2, and enable.JP Abgrall
The xt_quota2 came from http://sourceforge.net/projects/xtables-addons/develop It needed tweaking for it to compile within the kernel tree. Fixed kmalloc() and create_proc_entry() invocations within a non-interruptible context. Removed useless copying of current quota back to the iptable's struct matchinfo: - those are per CPU: they will change randomly based on which cpu gets to update the value. - they prevent matching a rule: e.g. -A chain -m quota2 --name q1 --quota 123 can't be followed by -D chain -m quota2 --name q1 --quota 123 as the 123 will be compared to the struct matchinfo's quota member. Change-Id: I021d3b743db3b22158cc49acb5c94d905b501492 Signed-off-by: JP Abgrall <jpa@google.com>
2011-07-12SUNRPC: Fix use of static variable in rpcb_getport_asyncBen Greear
Because struct rpcbind_args *map was declared static, if two threads entered this method at the same time, the values assigned to map could be sent two two differen tasks. This could cause all sorts of problems, include use-after-free and double-free of memory. Fix this by removing the static declaration so that the map pointer is on the stack. Signed-off-by: Ben Greear <greearb@candelatech.com> Cc: stable@kernel.org Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2011-07-11netfilter: adding the original quota2 from xtables-addonsJP Abgrall
The original xt_quota in the kernel is plain broken: - counts quota at a per CPU level (was written back when ubiquitous SMP was just a dream) - provides no way to count across IPV4/IPV6. This patch is the original unaltered code from: http://sourceforge.net/projects/xtables-addons at commit e84391ce665cef046967f796dd91026851d6bbf3 Change-Id: I19d49858840effee9ecf6cff03c23b45a97efdeb Signed-off-by: JP Abgrall <jpa@google.com>
2011-07-11Bluetooth: Add support for returning the encryption key sizeVinicius Costa Gomes
This will be useful when userspace wants to restrict some kinds of operations based on the length of the key size used to encrypt the link. Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>