aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-02-11pci: use security_capable() when checking capablities during config space readChris Wright1-1/+2
Eric Paris noted that commit de139a3 ("pci: check caps from sysfs file open to read device dependent config space") caused the capability check to bypass security modules and potentially auditing. Rectify this by calling security_capable() when checking the open file's capabilities for config space reads. Reported-by: Eric Paris <[email protected]> Signed-off-by: Chris Wright <[email protected]> Signed-off-by: James Morris <[email protected]>
2011-02-11security: add cred argument to security_capable()Chris Wright3-7/+6
Expand security_capable() to include cred, so that it can be usable in a wider range of call sites. Signed-off-by: Chris Wright <[email protected]> Acked-by: Serge Hallyn <[email protected]> Signed-off-by: James Morris <[email protected]>
2011-02-11Merge branch 'for-james' of ↵James Morris3-3/+21
git://tpmdd.git.sourceforge.net/gitroot/tpmdd/tpmdd into for-linus
2011-02-11cifs: don't always drop malformed replies on the floor (try #3)Jeff Layton3-7/+28
Slight revision to this patch...use min_t() instead of conditional assignment. Also, remove the FIXME comment and replace it with the explanation that Steve gave earlier. After receiving a packet, we currently check the header. If it's no good, then we toss it out and continue the loop, leaving the caller waiting on that response. In cases where the packet has length inconsistencies, but the MID is valid, this leads to unneeded delays. That's especially problematic now that the client waits indefinitely for responses. Instead, don't immediately discard the packet if checkSMB fails. Try to find a matching mid_q_entry, mark it as having a malformed response and issue the callback. Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: Steve French <[email protected]>
2011-02-11tpm_tis: Use timeouts returned from TPMStefan Berger3-3/+21
The current TPM TIS driver in git discards the timeout values returned from the TPM. The check of the response packet needs to consider that the return_code field is 0 on success and the size of the expected packet is equivalent to the header size + u32 length indicator for the TPM_GetCapability() result + 3 timeout indicators of type u32. I am also adding a sysfs entry 'timeouts' showing the timeouts that are being used. Signed-off-by: Stefan Berger <[email protected]> Tested-by: Guillaume Chazarain <[email protected]> Signed-off-by: Rajiv Andrade <[email protected]>
2011-02-10char/ipmi: fix OOPS caused by pnp_unregister_driver on unregistered driverCorey Minyard1-10/+2
This patch fixes an OOPS triggered when calling modprobe ipmi_si a second time after the first modprobe returned without finding any ipmi devices. This can happen if you reload the module after having the first module load fail. The driver was not deregistering from PNP in that case. Peter Huewe originally reported this patch and supplied a fix, I have a different patch based on Linus' suggestion that cleans things up a bit more. Cc: [email protected] Cc: [email protected] Reviewed-by: Peter Huewe <[email protected]> Cc: Randy Dunlap <[email protected]> Signed-off-by: Corey Minyard <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-02-10cap_syslog: accept CAP_SYS_ADMIN for nowLinus Torvalds1-19/+35
In commit ce6ada35bdf7 ("security: Define CAP_SYSLOG") Serge Hallyn introduced CAP_SYSLOG, but broke backwards compatibility by no longer accepting CAP_SYS_ADMIN as an override (it would cause a warning and then reject the operation). Re-instate CAP_SYS_ADMIN - but keeping the warning - as an acceptable capability until any legacy applications have been updated. There are apparently applications out there that drop all capabilities except for CAP_SYS_ADMIN in order to access the syslog. (This is a re-implementation of a patch by Serge, cleaning the logic up and making the code more readable) Acked-by: Serge Hallyn <[email protected]> Reviewed-by: James Morris <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-02-11ARM: SAMSUNG: Ensure struct sys_device is declared in plat/pm.hMark Brown1-0/+2
Previously we were relying on it being pulled in by other headers for the prototype of s3c24xx_irq_suspend() and s3c24xx_irq_resume(). Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Kukjin Kim <[email protected]>
2011-02-11ARM: S5PV310: Cleanup System MMUKukjin Kim6-46/+14
This patch cleans following up. - Moved definition of System MMU IPNUM into mach/sysmmu.h - Removed useless SYSMMU_DEBUG configuration - Removed useless header file plat/sysmmu.h Signed-off-by: Kukjin Kim <[email protected]>
2011-02-11ARM: S5PV310: Add support System MMU on SMDKV310Thomas Abraham1-0/+1
The 's5pv310_device_sysmmu' is used on SMDKV310. But since it is not compiled now, there is a build error. To fix this compilation error, S5PV310_DEV_SYSMMU needs to be selected for SMDKV310 board. This patch enables System MMU support on SMDKV310. Signed-off-by: Thomas Abraham <[email protected]> [[email protected]: Adding description] Signed-off-by: Kukjin Kim <[email protected]>
2011-02-10Merge branch 'usb-linus' of ↵Linus Torvalds27-57/+178
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 * 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (21 commits) USB: cdc-acm: Adding second ACM channel support for Nokia N8 USB, Mass Storage, composite, gadget: Fix build failure and memset of a struct USB: Fix trout build failure with ci13xxx_msm gadget USB: EHCI: fix scheduling while atomic during suspend USB: usb-storage: unusual_devs entry for Coby MP3 player USB: ftdi_sio: Add VID=0x0647, PID=0x0100 for Acton Research spectrograph USB: fix race between root-hub resume and wakeup requests USB: prevent buggy hubs from crashing the USB stack usb: r8a66597-udc: Fixed bufnum of Bulk USB: ftdi_sio: add ST Micro Connect Lite uart support USB: Storage: Add unusual_devs entry for VTech Kidizoom USB SL811HS HCD: Fix memory leak in sl811h_urb_enqueue() USB: ti_usb: fix module removal USB: io_edgeport: fix the reported firmware major and minor usb: ehci-omap: Show fatal probing time errors to end user usb: musb: introduce api for dma code to check compatibility with usb request usb: musb: maintain three states for buffer mappings instead of two usb: musb: disable double buffering when it's broken usb: musb: hsdma: change back to use musb_read/writew usb: musb: core: fix IRQ check ...
2011-02-10Merge branch 'tty-linus' of ↵Linus Torvalds7-11/+12
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 * 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: serial: bfin_5xx: split uart RX lock from uart port lock to avoid deadlock 68360serial: Plumb in rs_360_get_icount() n_gsm: copy mtu over when configuring via ioctl interface virtio: console: Move file back to drivers/char/
2011-02-10Merge branch 'staging-linus' of ↵Linus Torvalds14-6/+62
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 * 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: staging: zram: fix data corruption issue Staging: Comedi: Fix a few NI module dependencies Staging: comedi: Add MODULE_LICENSE and similar to NI modules staging: brcm80211: bugfix for softmac crash on multi cpu configurations staging: sst: Fix for dmic capture on v2 pmic staging: hv: Enable sending GARP packet after live migration
2011-02-10Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds40-203/+342
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (34 commits) virtio_net: Add schedule check to napi_enable call x25: Do not reference freed memory. pch_can: fix tseg1/tseg2 setting issue isdn: hysdn: Kill (partially buggy) CVS regision log reporting. can: softing_cs needs slab.h pch_gbe: Fix the issue which a driver locks when rx offload is set by ethtool netfilter: nf_conntrack: set conntrack templates again if we return NF_REPEAT pch_can: fix module reload issue with MSI pch_can: fix rmmod issue pch_can: fix 800k comms issue net: Fix lockdep regression caused by initializing netdev queues too early. net/caif: Fix dangling list pointer in freed object on error. USB CDC NCM errata updates for cdc_ncm host driver CDC NCM errata updates for cdc.h ixgbe: update version string ixgbe: cleanup variable initialization ixgbe: limit VF access to network traffic ixgbe: fix for 82599 erratum on Header Splitting ixgbe: fix variable set but not used warnings by gcc 4.6 e1000: add support for Marvell Alaska M88E1118R PHY ...
2011-02-10virtio_net: Add schedule check to napi_enable callBruce Rogers1-11/+16
Under harsh testing conditions, including low memory, the guest would stop receiving packets. With this patch applied we no longer see any problems in the driver while performing these tests for extended periods of time. Make sure napi is scheduled subsequent to each napi_enable. Signed-off-by: Bruce Rogers <[email protected]> Signed-off-by: Olaf Kirch <[email protected]> Cc: [email protected] Signed-off-by: Rusty Russell <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-10fix jiffy calculations in calibrate_delay_direct to handle overflowTim Deegan1-3/+3
Fixes a hang when booting as dom0 under Xen, when jiffies can be quite large by the time the kernel init gets this far. Signed-off-by: Tim Deegan <[email protected]> [[email protected]: !time_after() -> time_before_eq() as suggested by Jiri Slaby] Signed-off-by: Jan Beulich <[email protected]> Cc: Jiri Slaby <[email protected]> Cc: Jeremy Fitzhardinge <[email protected]> Cc: [email protected] Signed-off-by: Linus Torvalds <[email protected]>
2011-02-10ALSA: hrtimer: remove superfluous tasklet invocationClemens Ladisch1-1/+1
Commit bb758e9637e5ddc removed snd_hrtimer_callback() from the hardware interrupt handler, thus moving it into a tasklet, but did not tell the ALSA timer framework about this, so the timer handling would now be done in the ALSA timer tasklet scheduled from another tasklet. To fix this, add the flag to tell the ALSA timer framework that the timer handler is already being invoked in a tasklet. Signed-off-by: Clemens Ladisch <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2011-02-10ALSA: hrtimer: handle delayed timer interruptsClemens Ladisch1-2/+3
If a timer interrupt was delayed too much, hrtimer_forward_now() will forward the timer expiry more than once. When this happens, the additional number of elapsed ALSA timer ticks must be passed to snd_timer_interrupt() to prevent the ALSA timer from falling behind. This mostly fixes MIDI slowdown problems on highly-loaded systems with badly behaved interrupt handlers. Signed-off-by: Clemens Ladisch <[email protected]> Reported-and-tested-by: Arthur Marsh <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2011-02-10ALSA: HDA: Add subwoofer quirk for Acer Aspire 8942GDavid Henningsson1-0/+1
According to the reporter, node 0x15 needs to be muted for subwoofer to stop sounding. This pin is marked as unused by BIOS, so fix that. BugLink: http://bugs.launchpad.net/bugs/715877 Cc: [email protected] (2.6.37+) Reported-by: Hans Peter Signed-off-by: David Henningsson <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2011-02-10ALSA: hda - Don't handle empty patch filesTakashi Iwai1-1/+1
When an empty string is passed to patch option, the driver should ignore it. Otherwise it gets an error by trying to load it. Signed-off-by: Takashi Iwai <[email protected]>
2011-02-10amd64_edac: Fix DIMMs per DCTs outputBorislav Petkov1-20/+8
amd64_debug_display_dimm_sizes() reports the distribution of the DIMMs on each DRAM controller and its chip select sizes. Thus, the last don't have anything to do with whether we're running in ganged DCT mode or not - their sizes don't change all of a sudden. Fix that by removing the ganged-check and dump DCT0's config for DCT1 when in ganged mode since they're identical. Reported-and-tested-by: Markus Trippelsdorf <[email protected]> Signed-off-by: Borislav Petkov <[email protected]>
2011-02-09x25: Do not reference freed memory.David S. Miller1-1/+4
In x25_link_free(), we destroy 'nb' before dereferencing 'nb->dev'. Don't do this, because 'nb' might be freed by then. Reported-by: Randy Dunlap <[email protected]> Tested-by: Randy Dunlap <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-10cifs: clean up checks in cifs_echo_requestJeff Layton1-3/+4
Follow-on patch to 7e90d705 which is already in Steve's tree... The check for tcpStatus == CifsGood is not meaningful since it doesn't indicate whether the NEGOTIATE request has been done. Also, clarify why we're checking for maxBuf == 0. Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: Steve French <[email protected]>
2011-02-09Merge branch 'rc-fixes' of ↵Linus Torvalds1-3/+3
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 * 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: deb-pkg: Fix building outside of source tree (O=...). deb-pkg: Use $SRCARCH for include path
2011-02-09pch_can: fix tseg1/tseg2 setting issueTomoya MORINAGA1-2/+2
Previous patch "[PATCH 1/3] pch_can: fix 800k comms issue" is wrong. I should have modified tseg1_min not tseg2_min. This patch reverts tseg2_min to 1 and set tseg1_min to 2. Signed-off-by: Tomoya MORINAGA <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-09isdn: hysdn: Kill (partially buggy) CVS regision log reporting.David S. Miller4-32/+2
Some cases try to modify const strings, and in any event the CVS revision strings have not changed in over ten years making these printouts completely worthless. Just kill all of this stuff off. Reported-by: Randy Dunlap <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-09hwmon: (emc1403) Fix I2C address rangeGuenter Roeck1-1/+1
I2C address range included 0x2a, which the chips do not support. Replace with 0x29 which is supported but was missing. Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Jean Delvare <[email protected]>
2011-02-09hwmon: (lm63) Consider LM64 temperature offsetDirk Eibach1-12/+47
LM64 has 16 degrees Celsius temperature offset on all remote sensor registers. This was not considered When LM64 support was added to lm63.c. Signed-off-by: Dirk Eibach <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Cc: [email protected]
2011-02-09can: softing_cs needs slab.hRandy Dunlap1-0/+1
From: Randy Dunlap <[email protected]> softing_cs.c uses kzalloc & kfree, so it needs to include linux/slab.h. drivers/net/can/softing/softing_cs.c:234: error: implicit declaration of function 'kfree' drivers/net/can/softing/softing_cs.c:271: error: implicit declaration of function 'kzalloc' Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-09Merge branch 'master' of ↵David S. Miller1-2/+9
git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
2011-02-09pch_gbe: Fix the issue which a driver locks when rx offload is set by ethtoolToshiharu Okada1-8/+4
This driver will be in a deadlock, When the rx offload is set by ethtool. The pch_gbe_reinit_locked function was modified. Signed-off-by: Toshiharu Okada <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-09Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linusLinus Torvalds2-4/+17
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: virtio: console: Update Copyright virtio: console: Wake up outvq on host notifications
2011-02-09Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-blockLinus Torvalds8-8/+31
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: cdrom: support devices that have check_events but not media_changed cfq-iosched: Don't wait if queue already has requests. blkio-throttle: Avoid calling blkiocg_lookup_group() for root group cfq: rename a function to give it more appropriate name cciss: make cciss_revalidate not loop through CISS_MAX_LUNS volumes unnecessarily. drivers/block/aoe/Makefile: replace the use of <module>-objs with <module>-y loop: queue_lock NULL pointer derefence in blk_throtl_exit drivers/block/Makefile: replace the use of <module>-objs with <module>-y blktrace: Don't output messages if NOTIFY isn't set.
2011-02-09Merge branch 'for-linus' of git://neil.brown.name/mdLinus Torvalds5-49/+106
* 'for-linus' of git://neil.brown.name/md: FIX: md: process hangs at wait_barrier after 0->10 takeover md_make_request: don't touch the bio after calling make_request md: Don't allow slot_store while resync/recovery is happening. md: don't clear curr_resync_completed at end of resync. md: Don't use remove_and_add_spares to remove failed devices from a read-only array Add raid1->raid0 takeover support md: Remove the AllReserved flag for component devices. md: don't abort checking spares as soon as one cannot be added. md: fix the test for finding spares in raid5_start_reshape. md: simplify some 'if' conditionals in raid5_start_reshape. md: revert change to raid_disks on failure.
2011-02-09staging: zram: fix data corruption issueNitin Gupta1-0/+4
In zram_read() and zram_write() we were not incrementing the index number and thus were reading/writing values from/to incorrect sectors on zram disk, resulting in data corruption. Signed-off-by: Nitin Gupta <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-02-09Staging: Comedi: Fix a few NI module dependenciesIan Abbott1-1/+4
The ni_tio and ni_tio modules do not depend on the 8255 module, but the ni_atmio, ni_mio_cs and ni_pcimio modules do need the 8255 module. The ni_pcimio module also needs the comedi_fc module. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-02-09Staging: comedi: Add MODULE_LICENSE and similar to NI modulesIan Abbott7-2/+24
As mentioned by W. Trevor King on the [email protected] list on "Thu, 27 Jan 2011 18:52:15 -0500", "Message-ID: <[email protected]>", the ni_pcimio module is missing module metadata, including a license. This patch adds module metadata to all the NI comedi driver modules. It also removes a duplicate MODULE_LICENSE("GPL") line from the "mite" module. Signed-off-by: Ian Abbott <[email protected]> Cc: W. Trevor King <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-02-09KVM: SVM: Make sure KERNEL_GS_BASE is valid when loading gs_indexJoerg Roedel1-1/+1
The gs_index loading code uses the swapgs instruction to switch to the user gs_base temporarily. This is unsave in an lightweight exit-path in KVM on AMD because the KERNEL_GS_BASE MSR is switches lazily. An NMI happening in the critical path of load_gs_index may use the wrong GS_BASE value then leading to unpredictable behavior, e.g. a triple-fault. This patch fixes the issue by making sure that load_gs_index is called only with a valid KERNEL_GS_BASE value loaded in KVM. Signed-off-by: Joerg Roedel <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
2011-02-09cdrom: support devices that have check_events but not media_changedSimon Arlott1-1/+2
Commit 93aae17af1172c40c6f74b7294e93a90c3cfaa5d ("sr: implement sr_check_events()") replaced the media_changed op with the check_events op in drivers/scsi/sr.c All users that check for the CDC_MEDIA_CHANGED capbility try both the check_events op and the media_changed op, but register_cdrom() was requiring media_changed. This patch fixes the capability checking. The cdrom_select_disc ioctl is also using the two operations, so they should be required for CDC_SELECT_DISC too. Signed-off-by: Simon Arlott <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Kay Sievers <[email protected]> Tested-by: Chris Clayton <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2011-02-09cfq-iosched: Don't wait if queue already has requests.Justin TerAvest1-0/+4
Commit 7667aa0630407bc07dc38dcc79d29cc0a65553c1 added logic to wait for the last queue of the group to become busy (have at least one request), so that the group does not lose out for not being continuously backlogged. The commit did not check for the condition that the last queue already has some requests. As a result, if the queue already has requests, wait_busy is set. Later on, cfq_select_queue() checks the flag, and decides that since the queue has a request now and wait_busy is set, the queue is expired. This results in early expiration of the queue. This patch fixes the problem by adding a check to see if queue already has requests. If it does, wait_busy is not set. As a result, time slices do not expire early. The queues with more than one request are usually buffered writers. Testing shows improvement in isolation between buffered writers. Cc: [email protected] Signed-off-by: Justin TerAvest <[email protected]> Reviewed-by: Gui Jianfeng <[email protected]> Acked-by: Vivek Goyal <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2011-02-09netfilter: nf_conntrack: set conntrack templates again if we return NF_REPEATPablo Neira Ayuso1-2/+9
The TCP tracking code has a special case that allows to return NF_REPEAT if we receive a new SYN packet while in TIME_WAIT state. In this situation, the TCP tracking code destroys the existing conntrack to start a new clean session. [DESTROY] tcp 6 src=192.168.0.2 dst=192.168.1.2 sport=38925 dport=8000 src=192.168.1.2 dst=192.168.1.100 sport=8000 dport=38925 [ASSURED] [NEW] tcp 6 120 SYN_SENT src=192.168.0.2 dst=192.168.1.2 sport=38925 dport=8000 [UNREPLIED] src=192.168.1.2 dst=192.168.1.100 sport=8000 dport=38925 However, this is a problem for the iptables' CT target event filtering which will not work in this case since the conntrack template will not be there for the new session. To fix this, we reassign the conntrack template to the packet if we return NF_REPEAT. Signed-off-by: Pablo Neira Ayuso <[email protected]> Signed-off-by: Patrick McHardy <[email protected]>
2011-02-08pch_can: fix module reload issue with MSITomoya1-0/+1
Currently, in case reload pch_can, pch_can not to be able to catch interrupt. The cause is bus-master is not set in pch_can. Thus, add enabling bus-master processing. Signed-off-by: Tomoya MORINAGA <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-08pch_can: fix rmmod issueTomoya1-1/+1
Currently, when rmmod pch_can, kernel failure occurs. The cause is pci_iounmap executed before pch_can_reset. Thus pci_iounmap moves after pch_can_reset. Signed-off-by: Tomoya MORINAGA <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-08pch_can: fix 800k comms issueTomoya1-1/+1
Currently, 800k comms fails since prop_seg set zero. (EG20T PCH CAN register of prop_seg must be set more than 1) To prevent prop_seg set to zero, change tseg2_min 1 to 2. Signed-off-by: Tomoya MORINAGA <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-08[CIFS] Do not send SMBEcho requests on new sockets until SMBNegotiateSteve French2-1/+3
In order to determine whether an SMBEcho request can be sent we need to know that the socket is established (server tcpStatus == CifsGood) AND that an SMB NegotiateProtocol has been sent (server maxBuf != 0). Without the second check we can send an Echo request during reconnection before the server can accept it. CC: JG <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Steve French <[email protected]>
2011-02-08net: Fix lockdep regression caused by initializing netdev queues too early.David S. Miller1-11/+16
In commit aa9421041128abb4d269ee1dc502ff65fb3b7d69 ("net: init ingress queue") we moved the allocation and lock initialization of the queues into alloc_netdev_mq() since register_netdevice() is way too late. The problem is that dev->type is not setup until the setup() callback is invoked by alloc_netdev_mq(), and the dev->type is what determines the lockdep class to use for the locks in the queues. Fix this by doing the queue allocation after the setup() callback runs. This is safe because the setup() callback is not allowed to make any state changes that need to be undone on error (memory allocations, etc.). It may, however, make state changes that are undone by free_netdev() (such as netif_napi_add(), which is done by the ipoib driver's setup routine). The previous code also leaked a reference to the &init_net namespace object on RX/TX queue allocation failures. Signed-off-by: David S. Miller <[email protected]>
2011-02-08net/caif: Fix dangling list pointer in freed object on error.David S. Miller1-2/+2
rtnl_link_ops->setup(), and the "setup" callback passed to alloc_netdev*(), cannot make state changes which need to be undone on failure. There is no cleanup mechanism available at this point. So we have to add the caif private instance to the global list once we are sure that register_netdev() has succedded in ->newlink(). Otherwise, if register_netdev() fails, the caller will invoke free_netdev() and we will have a reference to freed up memory on the chnl_net_list. Signed-off-by: David S. Miller <[email protected]>
2011-02-08USB CDC NCM errata updates for cdc_ncm host driverAlexey Orishko1-80/+147
Specification links: - CDC NCM errata link: http://www.usb.org/developers/devclass_docs/NCM10_012011.zip - CDC and WMC errata link: http://www.usb.org/developers/devclass_docs/CDC1.2_WMC1.1_012011.zip Changes: - driver updated to match cdc.h header with errata changes - added support for USB_CDC_SET_NTB_INPUT_SIZE control request with 8 byte length - fixes to comply with specification: send only control requests supported by device, set number of datagrams for IN direction, connection speed structure update, etc. - packet loss fixed for tx direction; misleading flag renamed. - adjusted hard_mtu value. Signed-off-by: Alexey Orishko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-08CDC NCM errata updates for cdc.hAlexey Orishko1-5/+18
Changes are based on the following documents: - CDC NCM errata: http://www.usb.org/developers/devclass_docs/NCM10_012011.zip - CDC and WMC errata link: http://www.usb.org/developers/devclass_docs/CDC1.2_WMC1.1_012011.zip Signed-off-by: Alexey Orishko <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-09virtio: console: Update CopyrightAmit Shah2-2/+4
Signed-off-by: Amit Shah <[email protected]> Signed-off-by: Rusty Russell <[email protected]>