Linux 3.10.41
Greg KH
maintainerI'm announcing the release of the 3.10.41 kernel.
All users of the 3.10 kernel series must upgrade.
The updated 3.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.10.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/configs/multi_v7_defconfig | 2 arch/parisc/kernel/syscall_table.S | 2 arch/powerpc/lib/crtsavres.S | 186 +++++++++++++++++++++++++ block/blk-core.c | 2 drivers/block/rbd.c | 2 drivers/firewire/ohci.c | 31 +--- drivers/gpu/drm/qxl/qxl_ttm.c | 1 drivers/gpu/drm/radeon/radeon_display.c | 1 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 22 ++ drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 5 drivers/md/raid1.c | 17 +- drivers/net/bonding/bond_main.c | 1 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c | 3 drivers/net/ethernet/broadcom/tg3.c | 4 drivers/net/macvlan.c | 9 - drivers/net/usb/cdc_mbim.c | 39 +++-- drivers/net/usb/qmi_wwan.c | 38 ++++- drivers/scsi/megaraid/megaraid_mm.c | 2 drivers/scsi/scsi_scan.c | 112 +++++++++------ drivers/scsi/scsi_sysfs.c | 20 +- drivers/usb/class/cdc-acm.c | 28 ++- drivers/usb/serial/cp210x.c | 1 drivers/usb/serial/ftdi_sio.c | 33 ++++ drivers/usb/serial/ftdi_sio_ids.h | 37 ++++ drivers/usb/serial/io_ti.c | 50 ++++-- drivers/usb/serial/option.c | 83 ++++++++++- drivers/usb/serial/qcserial.c | 9 + drivers/usb/serial/sierra.c | 1 drivers/usb/serial/usb-serial.c | 4 drivers/usb/serial/usb_wwan.c | 9 - drivers/video/tgafb.c | 15 +- fs/file_table.c | 4 fs/open.c | 26 --- include/asm-generic/pgtable.h | 31 +++- include/linux/list.h | 16 ++ include/linux/sock_diag.h | 2 include/net/ip6_route.h | 5 include/net/netfilter/nf_conntrack_extend.h | 4 include/net/sctp/structs.h | 4 include/scsi/scsi_device.h | 3 include/trace/events/block.h | 33 ++++ kernel/events/core.c | 3 kernel/trace/blktrace.c | 20 +- kernel/tracepoint.c | 6 mm/hugetlb.c | 1 net/8021q/vlan_dev.c | 46 +++++- net/bridge/br_input.c | 2 net/bridge/br_netlink.c | 15 ++ net/bridge/br_vlan.c | 7 net/bridge/netfilter/ebtables.c | 5 net/core/dev.c | 2 net/core/filter.c | 6 net/core/rtnetlink.c | 33 ++-- net/core/skbuff.c | 12 - net/core/sock_diag.c | 4 net/ipv4/fib_semantics.c | 2 net/ipv4/ip_forward.c | 4 net/ipv4/ip_gre.c | 2 net/ipv4/ip_vti.c | 2 net/ipv4/netfilter/arp_tables.c | 6 net/ipv4/netfilter/ip_tables.c | 6 net/ipv4/ping.c | 15 +- net/ipv4/route.c | 4 net/ipv4/tcp_cubic.c | 2 net/ipv6/ip6_fib.c | 3 net/ipv6/ip6_gre.c | 10 + net/ipv6/ip6_output.c | 6 net/ipv6/ip6_tunnel.c | 2 net/ipv6/netfilter/ip6_tables.c | 6 net/ipv6/route.c | 5 net/l2tp/l2tp_ppp.c | 4 net/packet/diag.c | 2 net/sctp/auth.c | 17 -- net/sctp/endpointola.c | 3 net/sctp/protocol.c | 7 net/sctp/sm_make_chunk.c | 32 ++-- net/sctp/sm_statefuns.c | 6 net/sctp/socket.c | 96 +++++++++--- net/sctp/sysctl.c | 38 ++++- scripts/mod/modpost.c | 8 - 81 files changed, 1040 insertions(+), 309 deletions(-)
Al Viro (1):
don't bother with {get,put}_write_access() on non-regular files
Aleksander Morgado (2):
net: qmi_wwan: fix Cinterion PLXX product ID
net: qmi_wwan: add support for Cinterion PXS8 and PHS8
Alex Deucher (1):
drm/radeon: call drm_edid_to_eld when we update the edid
Andreas Schwab (1):
powerpc: Add vr save/restore functions
Andrew Lutomirski (1):
net: Fix ns_capable check in sock_diag_put_filterinfo
Andrey Vagin (1):
netfilter: nf_conntrack: reserve two bytes for nf_ct_ext->len
Bjørn Mork (17):
usb: qcserial: add Sierra Wireless EM7355
usb: qcserial: add Sierra Wireless MC73xx
usb: qcserial: add Sierra Wireless MC7305/MC7355
usb: option: add Olivetti Olicard 500
usb: option: add Alcatel L800MA
usb: option: add and update a number of CMOTech devices
net: cdc_mbim: handle unaccelerated VLAN tagged frames
net: qmi_wwan: fixup Sierra Wireless MC8305 entry
net: qmi_wwan: add Option GTM681W
net: qmi_wwan: add TP-LINK MA260
net: qmi_wwan: add Sierra Wireless EM7355
net: qmi_wwan: add Sierra Wireless MC73xx
net: qmi_wwan: add Sierra Wireless MC7305/MC7355
net: qmi_wwan: add Olivetti Olicard 500
net: qmi_wwan: add Alcatel L800MA
net: qmi_wwan: add a number of CMOTech devices
net: qmi_wwan: add a number of Dell devices
Christopher Friedt (1):
drm/vmwgfx: correct fb_fix_screeninfo.line_length
Dan Carpenter (1):
SCSI: megaraid: missing bounds check in mimd_to_kioc()
Daniel Borkmann (2):
net: sctp: wake up all assocs if sndbuf policy is per socket
net: sctp: test if association is dead in sctp_wake_up_waiters
Daniele Palmas (1):
usb: option driver, add support for Telit UE910v2
David Gibson (2):
rtnetlink: Warn when interface's information won't fit in our packet
rtnetlink: Only supply IFLA_VF_PORTS information when RTEXT_FILTER_VF is set
Dmitry Petukhov (1):
l2tp: take PMTU from tunnel UDP socket
Enrico Mioso (2):
qmi_wwan: add ONDA MT689DC device ID (fwd)
net: qmi_wwan: Olivetti Olicard 200 support
Eric Dumazet (2):
ipv6: Limit mtu to 65575 bytes
net-gro: reset skb->truesize in napi_reuse_skb()
Fabio Porcedda (1):
net: qmi_wwan: add Telit LE920 newer firmware support
Florian Westphal (3):
net: core: don't account for udp header size when computing seglen
net: ipv4: ip_forward: fix inverted local_df test
net: ipv6: send pkttoobig immediately if orig frag size > mtu
Greg Kroah-Hartman (1):
Linux 3.10.41
Helge Deller (1):
parisc: fix epoll_pwait syscall on compat kernel
Ilya Dryomov (1):
rbd: fix error paths in rbd_img_request_fill()
Ivan Vecera (1):
tg3: update rx_jumbo_pending ring param only when jumbo frames are enabled
James Bottomley (2):
scsi: fix our current target reap infrastructure
SCSI: dual scan thread bug fix
Johan Hovold (4):
USB: usb_wwan: fix handling of missing bulk endpoints Revert "USB: serial: add usbid for dell wwan card to sierra.c"
USB: serial: fix sysfs-attribute removal deadlock
USB: io_ti: fix firmware download on big-endian machines
Julian Anastasov (1):
ipv4: return valid RTA_IIF on ip route get
Kumar Sundararajan (1):
ipv6: fib: fix fib dump restart
Li RongQing (1):
ipv4: initialise the itag variable in __mkroute_input
Liu Yu (1):
tcp_cubic: fix the range of delayed_ack
Maarten Lankhorst (1):
drm/qxl: unset a pointer in sync_obj_unref
Mathias Krause (1):
filter: prevent nla extensions to peek beyond the end of the message
Mel Gorman (1):
mm: use paravirt friendly ops for NUMA hinting ptes
Michael Ulbricht (1):
USB: cdc-acm: Remove Motorola/Telit H24 serial interfaces from ACM driver
Michele Baldessari (1):
USB: serial: ftdi_sio: add id for Brainboxes serial cards
Mikulas Patocka (1):
tgafb: fix mode setting with fbset
Mizuma, Masayoshi (1):
mm/hugetlb.c: add cond_resched_lock() in return_unused_surplus_pages()
NeilBrown (1):
md/raid1: r1buf_pool_alloc: free allocate pages when subsequent allocation fails.
Nicolas Dichtel (3):
gre: don't allow to add the same tunnel twice
vti: don't allow to add the same tunnel twice
ip6_gre: don't allow to remove the fb_tunnel_dev
Oleg Nesterov (1):
list: introduce list_next_entry() and list_prev_entry()
Olof Johansson (1):
ARM: multi_v7_defconfig: enable ARM_ATAG_DTB_COMPAT
Peter Christensen (1):
macvlan: Don't propagate IFF_ALLMULTI changes on down interfaces.
Raymond Wanyoike (1):
net: qmi_wwan: add ZTE MF667
Roman Pen (1):
blktrace: fix accounting of partially completed requests
Sergey Popovich (1):
ipv4: fib_semantics: increment fib_info_cnt after fib_info allocation
Soren Brinkmann (1):
arm: multi_v7_defconfig: Enable initrd/initramfs support
Stefan Richter (2):
firewire: ohci: beautify some macro definitions
firewire: ohci: fix probe failure with Agere/LSI controllers
Steven Rostedt (Red Hat) (1):
tracepoint: Do not waste memory on mods with no tracepoints
Susant Sahani (1):
ip6_tunnel: fix potential NULL pointer dereference
Thomas Graf (1):
netfilter: Can't fail and free after table replacement
Thomas Hellstrom (1):
drm/vmwgfx: Make sure user-space can't DMA across buffer object boundaries v2
Thomas Richter (1):
bonding: Remove debug_fs files when module init fails
Toshiaki Makita (2):
bridge: Fix double free and memory leak around br_allowed_ingress
bridge: Handle IFLA_ADDRESS correctly when creating bridge device
Tristan Bruns (1):
USB: cp210x: Add 8281 (Nanotec Plug & Drive)
Vlad Yasevich (2):
net: sctp: cache auth_enable per endpoint
Revert "macvlan : fix checksums error when we are in bridge mode"
Wang, Xiaoming (1):
net: ipv4: current group_info should be put after using.
Xufeng Zhang (1):
sctp: reset flowi4_oif parameter on route lookup
dingtianhong (1):
vlan: Fix lockdep warning when vlan dev handle notification
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 10 -SUBLEVEL = 40 +SUBLEVEL = 41 EXTRAVERSION = NAME = TOSSUG Baby Fish
arch/arm/configs/multi_v7_defconfig +2 -0
@@ -1,6 +1,7 @@ CONFIG_EXPERIMENTAL=y CONFIG_NO_HZ=y CONFIG_HIGH_RES_TIMERS=y +CONFIG_BLK_DEV_INITRD=y CONFIG_ARCH_MVEBU=y CONFIG_MACH_ARMADA_370=y CONFIG_ARCH_SIRF=y
@@ -22,6 +23,7 @@ CONFIG_AEABI=y CONFIG_HIGHMEM=y CONFIG_HIGHPTE=y CONFIG_ARM_APPENDED_DTB=y +CONFIG_ARM_ATAG_DTB_COMPAT=y CONFIG_VFP=y CONFIG_NEON=y CONFIG_NET=y
arch/parisc/kernel/syscall_table.S +1 -1
@@ -392,7 +392,7 @@ ENTRY_COMP(vmsplice) ENTRY_COMP(move_pages) /* 295 */ ENTRY_SAME(getcpu) - ENTRY_SAME(epoll_pwait) + ENTRY_COMP(epoll_pwait) ENTRY_COMP(statfs64) ENTRY_COMP(fstatfs64) ENTRY_COMP(kexec_load) /* 300 */
arch/powerpc/lib/crtsavres.S +186 -0
198 lines not on this page · raw message
block/blk-core.c +1 -1
@@ -2299,7 +2299,7 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes)if (!req->bio)return false; -trace_block_rq_complete (req->q, req); +trace_block_rq_complete (req->q, req, nr_bytes);/* * For fs requests, rq is just carrier of independent bio's
drivers/block/rbd.c +1 -1
@@ -2278,7 +2278,7 @@ out_partial:rbd_obj_request_put (obj_request); out_unwind:for_each_obj_request_safe (img_request, obj_request, next_obj_request) -rbd_obj_request_put (obj_request); +rbd_img_obj_request_del (img_request, obj_request);return -ENOMEM ; }
drivers/firewire/ohci.c +10 -21
@@ -271,6 +271,7 @@ static inline struct fw_ohci *fw_ohci(struct fw_card *card)static char ohci_driver_name[] =KBUILD_MODNAME ; +#define PCI_VENDOR_ID_PINNACLE_SYSTEMS 0x11bd#define PCI_DEVICE_ID_AGERE_FW643 0x5901#define PCI_DEVICE_ID_CREATIVE_SB1394 0x4001#define PCI_DEVICE_ID_JMICRON_JMB38X_FW 0x2380
@@ -278,17 +279,15 @@ static char ohci_driver_name[] = KBUILD_MODNAME;#define PCI_DEVICE_ID_TI_TSB12LV26 0x8020#define PCI_DEVICE_ID_TI_TSB82AA2 0x8025#define PCI_DEVICE_ID_VIA_VT630X 0x3044 -#define PCI_VENDOR_ID_PINNACLE_SYSTEMS 0x11bd#define PCI_REV_ID_VIA_VT6306 0x46 -#define QUIRK_CYCLE_TIMER 1 -#define QUIRK_RESET_PACKET 2 -#define QUIRK_BE_HEADERS 4 -#define QUIRK_NO_1394A 8 -#define QUIRK_NO_MSI 16 -#define QUIRK_TI_SLLZ059 32 -#define QUIRK_IR_WAKE 64 -#define QUIRK_PHY_LCTRL_TIMEOUT 128 +#define QUIRK_CYCLE_TIMER 0x1 +#define QUIRK_RESET_PACKET 0x2 +#define QUIRK_BE_HEADERS 0x4 +#define QUIRK_NO_1394A 0x8 +#define QUIRK_NO_MSI 0x10 +#define QUIRK_TI_SLLZ059 0x20 +#define QUIRK_IR_WAKE 0x40/* In case of multiple matches in ohci_quirks[], only the first one is used. */ static const struct {
@@ -301,10 +300,7 @@ static const struct { QUIRK_BE_HEADERS}, {PCI_VENDOR_ID_ATT ,PCI_DEVICE_ID_AGERE_FW643 ,6 , - QUIRK_PHY_LCTRL_TIMEOUT | QUIRK_NO_MSI}, - - {PCI_VENDOR_ID_ATT, PCI_ANY_ID, PCI_ANY_ID, - QUIRK_PHY_LCTRL_TIMEOUT}, + QUIRK_NO_MSI}, {PCI_VENDOR_ID_CREATIVE, PCI_DEVICE_ID_CREATIVE_SB1394, PCI_ANY_ID, QUIRK_RESET_PACKET},
@@ -351,7 +347,6 @@ MODULE_PARM_DESC(quirks, "Chip quirks (default = 0" ", disable MSI = " __stringify(QUIRK_NO_MSI) ", TI SLLZ059 erratum = " __stringify(QUIRK_TI_SLLZ059) ", IR wake unreliable = " __stringify(QUIRK_IR_WAKE) - ", phy LCtrl timeout = " __stringify(QUIRK_PHY_LCTRL_TIMEOUT) ")");#define OHCI_PARAM_DEBUG_AT_AR 1
@@ -2293,9 +2288,6 @@ static int ohci_enable(struct fw_card *card,* TI TSB82AA2 + TSB81BA3(A) cards signal LPS enabled early but * cannot actually use the phy at that time. These need tens of * millisecods pause between LPS write and first phy access too. -* -* But do not wait for 50msec on Agere/LSI cards. Their phy -* arbitration state machine may time out during such a long wait. */ reg_write(ohci, OHCI1394_HCControlSet,
@@ -2303,11 +2295,8 @@ static int ohci_enable(struct fw_card *card, OHCI1394_HCControl_postedWriteEnable);flush_writes (ohci); -if (!(ohci->quirks &QUIRK_PHY_LCTRL_TIMEOUT )) +for (lps =0 , i =0 ; !lps && i <3 ; i++) {msleep (50 ); - -for (lps =0 , i =0 ; !lps && i <150 ; i++) { -msleep (1 ); lps =reg_read (ohci, OHCI1394_HCControlSet) & OHCI1394_HCControl_LPS; }
drivers/gpu/drm/qxl/qxl_ttm.c +1 -0
@@ -431,6 +431,7 @@ static int qxl_sync_obj_flush(void *sync_obj)static void qxl_sync_obj_unref (void **sync_obj) { + *sync_obj =NULL ; }static void *qxl_sync_obj_ref (void *sync_obj)
drivers/gpu/drm/radeon/radeon_display.c +1 -0
@@ -729,6 +729,7 @@ int radeon_ddc_get_modes(struct radeon_connector *radeon_connector)if (radeon_connector->edid) {drm_mode_connector_update_edid_property (&radeon_connector->base, radeon_connector->edid); ret =drm_add_edid_modes (&radeon_connector->base, radeon_connector->edid); +drm_edid_to_eld (&radeon_connector->base, radeon_connector->edid);return ret; }drm_mode_connector_update_edid_property (&radeon_connector->base,NULL );
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +22 -0
@@ -834,14 +834,36 @@ static int vmw_cmd_dma(struct vmw_private *dev_priv,SVGA3dCmdSurfaceDMA dma; } *cmd;int ret; +SVGA3dCmdSurfaceDMASuffix *suffix; +uint32_t bo_size; cmd = container_of(header, struct vmw_dma_cmd, header); + suffix = (SVGA3dCmdSurfaceDMASuffix *)((unsigned long ) &cmd->dma + + header->size -sizeof (*suffix)); + +/* Make sure device and verifier stays in sync. */ +if (unlikely (suffix->suffixSize !=sizeof (*suffix))) { +DRM_ERROR ("Invalid DMA suffix size.\n" ); +return -EINVAL ; + } + ret =vmw_translate_guest_ptr (dev_priv, sw_context, &cmd->dma.guest.ptr, &vmw_bo);if (unlikely (ret !=0 ))return ret; +/* Make sure DMA doesn't cross BO boundaries. */ + bo_size = vmw_bo->base.num_pages *PAGE_SIZE ; +if (unlikely (cmd->dma.guest.ptr.offset > bo_size)) { +DRM_ERROR ("Invalid DMA offset.\n" ); +return -EINVAL ; + } + + bo_size -= cmd->dma.guest.ptr.offset; +if (unlikely (suffix->maximumOffset > bo_size)) + suffix->maximumOffset = bo_size; + ret =vmw_cmd_res_check (dev_priv, sw_context, vmw_res_surface, user_surface_converter, &cmd->dma.host.sid,NULL );
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c +4 -1
@@ -147,7 +147,7 @@ static int vmw_fb_check_var(struct fb_var_screeninfo *var, }if (!vmw_kms_validate_mode_vram (vmw_priv, - info->fix.line_length, + var->xres * var->bits_per_pixel/8 , var->yoffset + var->yres)) {DRM_ERROR ("Requested geom can not fit in framebuffer\n" );return -EINVAL ;
@@ -162,6 +162,8 @@ static int vmw_fb_set_par(struct fb_info *info)struct vmw_private *vmw_priv = par->vmw_priv;int ret; + info->fix.line_length = info->var.xres * info->var.bits_per_pixel/8 ; + ret =vmw_kms_write_svga (vmw_priv, info->var.xres, info->var.yres, info->fix.line_length, par->bpp, par->depth);
@@ -177,6 +179,7 @@ static int vmw_fb_set_par(struct fb_info *info)vmw_write (vmw_priv,SVGA_REG_DISPLAY_POSITION_Y , info->var.yoffset);vmw_write (vmw_priv,SVGA_REG_DISPLAY_WIDTH , info->var.xres);vmw_write (vmw_priv,SVGA_REG_DISPLAY_HEIGHT , info->var.yres); +vmw_write (vmw_priv,SVGA_REG_BYTES_PER_LINE , info->fix.line_length);vmw_write (vmw_priv,SVGA_REG_DISPLAY_ID ,SVGA_ID_INVALID ); }
drivers/md/raid1.c +13 -4
@@ -94,6 +94,7 @@ static void * r1buf_pool_alloc(gfp_t gfp_flags, void *data)struct pool_info *pi = data;struct r1bio *r1_bio;struct bio *bio; +int need_pages;int i, j; r1_bio =r1bio_pool_alloc (gfp_flags, pi);
@@ -116,15 +117,15 @@ static void * r1buf_pool_alloc(gfp_t gfp_flags, void *data)* RESYNC_PAGES for each bio. */ if (test_bit (MD_RECOVERY_REQUESTED , &pi->mddev->recovery)) - j = pi->raid_disks; + need_pages = pi->raid_disks;else - j =1 ; -while (j--) { + need_pages =1 ; +for (j =0 ; j < need_pages; j++) { bio = r1_bio->bios[j]; bio->bi_vcnt =RESYNC_PAGES ;if (bio_alloc_pages (bio, gfp_flags)) - goto out_free_bio; + goto out_free_pages; }/* If not user-requests, copy the page pointers to all bios */ if (!test_bit (MD_RECOVERY_REQUESTED , &pi->mddev->recovery)) {
@@ -138,6 +139,14 @@ static void * r1buf_pool_alloc(gfp_t gfp_flags, void *data)return r1_bio; +out_free_pages: +while (--j >=0 ) { +struct bio_vec *bv; + +bio_for_each_segment_all (bv, r1_bio->bios[j], i) +__free_page (bv->bv_page); + } + out_free_bio:while (++j < pi->raid_disks)bio_put (r1_bio->bios[j]);
drivers/net/bonding/bond_main.c +1 -0
@@ -4995,6 +4995,7 @@ static int __init bonding_init(void) out:return res; err: +bond_destroy_debugfs ();rtnl_link_unregister (&bond_link_ops); err_link:unregister_pernet_subsys (&bond_net_ops);
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c +0 -3
@@ -1038,9 +1038,6 @@ static void bnx2x_set_one_vlan_mac_e1h(struct bnx2x *bp, ETH_VLAN_FILTER_CLASSIFY, config); } -#define list_next_entry (pos, member) \ - list_entry((pos)->member.next, typeof(*(pos)), member) -/** * bnx2x_vlan_mac_restore - reconfigure next MAC/VLAN/VLAN-MAC element *
drivers/net/ethernet/broadcom/tg3.c +3 -1
@@ -12073,7 +12073,9 @@ static int tg3_set_ringparam(struct net_device *dev, struct ethtool_ringparam *eif (tg3_flag (tp,MAX_RXPEND_64 ) && tp->rx_pending >63 ) tp->rx_pending =63 ; - tp->rx_jumbo_pending = ering->rx_jumbo_pending; + +if (tg3_flag (tp,JUMBO_RING_ENABLE )) + tp->rx_jumbo_pending = ering->rx_jumbo_pending;for (i =0 ; i < tp->irq_max; i++) tp->napi[i].tx_pending = ering->tx_pending;
drivers/net/macvlan.c +4 -5
@@ -261,11 +261,9 @@ static int macvlan_queue_xmit(struct sk_buff *skb, struct net_device *dev)const struct macvlan_dev *vlan =netdev_priv (dev);const struct macvlan_port *port = vlan->port;const struct macvlan_dev *dest; -__u8 ip_summed = skb->ip_summed;if (vlan->mode ==MACVLAN_MODE_BRIDGE ) {const struct ethhdr *eth = (void *)skb->data; - skb->ip_summed =CHECKSUM_UNNECESSARY ;/* send to other bridge ports directly */ if (is_multicast_ether_addr (eth->h_dest)) {
@@ -283,7 +281,6 @@ static int macvlan_queue_xmit(struct sk_buff *skb, struct net_device *dev) } xmit_world: - skb->ip_summed = ip_summed; skb->dev = vlan->lowerdev;return dev_queue_xmit (skb); }
@@ -423,8 +420,10 @@ static void macvlan_change_rx_flags(struct net_device *dev, int change)struct macvlan_dev *vlan =netdev_priv (dev);struct net_device *lowerdev = vlan->lowerdev; -if (change &IFF_ALLMULTI ) -dev_set_allmulti (lowerdev, dev->flags &IFF_ALLMULTI ?1 :-1 ); +if (dev->flags &IFF_UP ) { +if (change &IFF_ALLMULTI ) +dev_set_allmulti (lowerdev, dev->flags &IFF_ALLMULTI ?1 :-1 ); + } }static void macvlan_set_mac_lists (struct net_device *dev)
drivers/net/usb/cdc_mbim.c +28 -11
@@ -120,6 +120,16 @@ static void cdc_mbim_unbind(struct usbnet *dev, struct usb_interface *intf)cdc_ncm_unbind (dev, intf); } +/* verify that the ethernet protocol is IPv4 or IPv6 */ +static bool is_ip_proto (__be16 proto) +{ +switch (proto) { +case htons (ETH_P_IP ): +case htons (ETH_P_IPV6 ): +return true; + } +return false; +}static struct sk_buff *cdc_mbim_tx_fixup (struct usbnet *dev,struct sk_buff *skb,gfp_t flags) {
@@ -128,6 +138,7 @@ static struct sk_buff *cdc_mbim_tx_fixup(struct usbnet *dev, struct sk_buff *skbstruct cdc_ncm_ctx *ctx = info->ctx;__le32 sign =cpu_to_le32 (USB_CDC_MBIM_NDP16_IPS_SIGN );u16 tci =0 ; +bool is_ip;u8 *c;if (!ctx)
@@ -137,25 +148,32 @@ static struct sk_buff *cdc_mbim_tx_fixup(struct usbnet *dev, struct sk_buff *skbif (skb->len <=ETH_HLEN ) goto error; +/* Some applications using e.g. packet sockets will +* bypass the VLAN acceleration and create tagged +* ethernet frames directly. We primarily look for +* the accelerated out-of-band tag, but fall back if +* required +*/ +skb_reset_mac_header (skb); +if (vlan_get_tag (skb, &tci) <0 && skb->len >VLAN_ETH_HLEN && +__vlan_get_tag (skb, &tci) ==0 ) { + is_ip =is_ip_proto (vlan_eth_hdr (skb)->h_vlan_encapsulated_proto); +skb_pull (skb,VLAN_ETH_HLEN ); + }else { + is_ip =is_ip_proto (eth_hdr (skb)->h_proto); +skb_pull (skb,ETH_HLEN ); + } +/* mapping VLANs to MBIM sessions: * no tag => IPS session <0> * 1 - 255 => IPS session <vlanid> * 256 - 511 => DSS session <vlanid - 256> * 512 - 4095 => unsupported, drop */ -vlan_get_tag (skb, &tci); -switch (tci &0x0f00 ) {case 0x0000 :/* VLAN ID 0 - 255 */ -/* verify that datagram is IPv4 or IPv6 */ -skb_reset_mac_header (skb); -switch (eth_hdr (skb)->h_proto) { -case htons (ETH_P_IP ): -case htons (ETH_P_IPV6 ): -break ; -default : +if (!is_ip) goto error; - } c = (u8 *)&sign; c[3 ] = tci;break ;
@@ -169,7 +187,6 @@ static struct sk_buff *cdc_mbim_tx_fixup(struct usbnet *dev, struct sk_buff *skb "unsupported tci=0x%04x\n", tci); goto error; } -skb_pull (skb,ETH_HLEN ); }spin_lock_bh (&ctx->mtx);
drivers/net/usb/qmi_wwan.c +36 -2
@@ -649,9 +649,26 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x05c6, 0x920d, 5)}, {QMI_FIXED_INTF(0x12d1, 0x140c, 1)}, /* Huawei E173 */ {QMI_FIXED_INTF(0x12d1, 0x14ac, 1)}, /* Huawei E1820 */ + {QMI_FIXED_INTF(0x16d8, 0x6003, 0)}, /* CMOTech 6003 */ + {QMI_FIXED_INTF(0x16d8, 0x6007, 0)}, /* CMOTech CHE-628S */ + {QMI_FIXED_INTF(0x16d8, 0x6008, 0)}, /* CMOTech CMU-301 */ + {QMI_FIXED_INTF(0x16d8, 0x6280, 0)}, /* CMOTech CHU-628 */ + {QMI_FIXED_INTF(0x16d8, 0x7001, 0)}, /* CMOTech CHU-720S */ + {QMI_FIXED_INTF(0x16d8, 0x7002, 0)}, /* CMOTech 7002 */ + {QMI_FIXED_INTF(0x16d8, 0x7003, 4)}, /* CMOTech CHU-629K */ + {QMI_FIXED_INTF(0x16d8, 0x7004, 3)}, /* CMOTech 7004 */ + {QMI_FIXED_INTF(0x16d8, 0x7006, 5)}, /* CMOTech CGU-629 */ + {QMI_FIXED_INTF(0x16d8, 0x700a, 4)}, /* CMOTech CHU-629S */ + {QMI_FIXED_INTF(0x16d8, 0x7211, 0)}, /* CMOTech CHU-720I */ + {QMI_FIXED_INTF(0x16d8, 0x7212, 0)}, /* CMOTech 7212 */ + {QMI_FIXED_INTF(0x16d8, 0x7213, 0)}, /* CMOTech 7213 */ + {QMI_FIXED_INTF(0x16d8, 0x7251, 1)}, /* CMOTech 7251 */ + {QMI_FIXED_INTF(0x16d8, 0x7252, 1)}, /* CMOTech 7252 */ + {QMI_FIXED_INTF(0x16d8, 0x7253, 1)}, /* CMOTech 7253 */ {QMI_FIXED_INTF(0x19d2, 0x0002, 1)}, {QMI_FIXED_INTF(0x19d2, 0x0012, 1)}, {QMI_FIXED_INTF(0x19d2, 0x0017, 3)}, + {QMI_FIXED_INTF(0x19d2, 0x0019, 3)}, /* ONDA MT689DC */ {QMI_FIXED_INTF(0x19d2, 0x0021, 4)}, {QMI_FIXED_INTF(0x19d2, 0x0025, 1)}, {QMI_FIXED_INTF(0x19d2, 0x0031, 4)},
@@ -698,6 +715,7 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x19d2, 0x1255, 3)}, {QMI_FIXED_INTF(0x19d2, 0x1255, 4)}, {QMI_FIXED_INTF(0x19d2, 0x1256, 4)}, + {QMI_FIXED_INTF(0x19d2, 0x1270, 5)}, /* ZTE MF667 */ {QMI_FIXED_INTF(0x19d2, 0x1401, 2)}, {QMI_FIXED_INTF(0x19d2, 0x1402, 2)}, /* ZTE MF60 */ {QMI_FIXED_INTF(0x19d2, 0x1424, 2)},
@@ -708,12 +726,28 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x114f, 0x68a2, 8)}, /* Sierra Wireless MC7750 */ {QMI_FIXED_INTF(0x1199, 0x68a2, 8)}, /* Sierra Wireless MC7710 in QMI mode */ {QMI_FIXED_INTF(0x1199, 0x68a2, 19)}, /* Sierra Wireless MC7710 in QMI mode */ + {QMI_FIXED_INTF(0x1199, 0x68c0, 8)}, /* Sierra Wireless MC73xx */ + {QMI_FIXED_INTF(0x1199, 0x68c0, 10)}, /* Sierra Wireless MC73xx */ + {QMI_FIXED_INTF(0x1199, 0x68c0, 11)}, /* Sierra Wireless MC73xx */ {QMI_FIXED_INTF(0x1199, 0x901c, 8)}, /* Sierra Wireless EM7700 */ + {QMI_FIXED_INTF(0x1199, 0x901f, 8)}, /* Sierra Wireless EM7355 */ + {QMI_FIXED_INTF(0x1199, 0x9041, 8)}, /* Sierra Wireless MC7305/MC7355 */ {QMI_FIXED_INTF(0x1199, 0x9051, 8)}, /* Netgear AirCard 340U */ {QMI_FIXED_INTF(0x1bbb, 0x011e, 4)}, /* Telekom Speedstick LTE II (Alcatel One Touch L100V LTE) */ + {QMI_FIXED_INTF(0x1bbb, 0x0203, 2)}, /* Alcatel L800MA */ {QMI_FIXED_INTF(0x2357, 0x0201, 4)}, /* TP-LINK HSUPA Modem MA180 */ + {QMI_FIXED_INTF(0x2357, 0x9000, 4)}, /* TP-LINK MA260 */ {QMI_FIXED_INTF(0x1bc7, 0x1200, 5)}, /* Telit LE920 */ - {QMI_FIXED_INTF(0x1e2d, 0x12d1, 4)}, /* Cinterion PLxx */ + {QMI_FIXED_INTF(0x1bc7, 0x1201, 2)}, /* Telit LE920 */ + {QMI_FIXED_INTF(0x0b3c, 0xc005, 6)}, /* Olivetti Olicard 200 */ + {QMI_FIXED_INTF(0x0b3c, 0xc00b, 4)}, /* Olivetti Olicard 500 */ + {QMI_FIXED_INTF(0x1e2d, 0x0060, 4)}, /* Cinterion PLxx */ + {QMI_FIXED_INTF(0x1e2d, 0x0053, 4)}, /* Cinterion PHxx,PXxx */ + {QMI_FIXED_INTF(0x413c, 0x81a2, 8)}, /* Dell Wireless 5806 Gobi(TM) 4G LTE Mobile Broadband Card */ + {QMI_FIXED_INTF(0x413c, 0x81a3, 8)}, /* Dell Wireless 5570 HSPA+ (42Mbps) Mobile Broadband Card */ + {QMI_FIXED_INTF(0x413c, 0x81a4, 8)}, /* Dell Wireless 5570e HSPA+ (42Mbps) Mobile Broadband Card */ + {QMI_FIXED_INTF(0x413c, 0x81a8, 8)}, /* Dell Wireless 5808 Gobi(TM) 4G LTE Mobile Broadband Card */ + {QMI_FIXED_INTF(0x413c, 0x81a9, 8)}, /* Dell Wireless 5808e Gobi(TM) 4G LTE Mobile Broadband Card *//* 4. Gobi 1000 devices */ {QMI_GOBI1K_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */
@@ -747,6 +781,7 @@ static const struct usb_device_id products[] = { {QMI_GOBI_DEVICE(0x05c6, 0x9265)}, /* Asus Gobi 2000 Modem device (VR305) */ {QMI_GOBI_DEVICE(0x05c6, 0x9235)}, /* Top Global Gobi 2000 Modem device (VR306) */ {QMI_GOBI_DEVICE(0x05c6, 0x9275)}, /* iRex Technologies Gobi 2000 Modem device (VR307) */ + {QMI_GOBI_DEVICE(0x0af0, 0x8120)}, /* Option GTM681W */ {QMI_GOBI_DEVICE(0x1199, 0x68a5)}, /* Sierra Wireless Modem */ {QMI_GOBI_DEVICE(0x1199, 0x68a9)}, /* Sierra Wireless Modem */ {QMI_GOBI_DEVICE(0x1199, 0x9001)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
@@ -760,7 +795,6 @@ static const struct usb_device_id products[] = { {QMI_GOBI_DEVICE(0x1199, 0x9009)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */ {QMI_GOBI_DEVICE(0x1199, 0x900a)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */ {QMI_GOBI_DEVICE(0x1199, 0x9011)}, /* Sierra Wireless Gobi 2000 Modem device (MC8305) */ - {QMI_FIXED_INTF(0x1199, 0x9011, 5)}, /* alternate interface number!? */ {QMI_GOBI_DEVICE(0x16d8, 0x8002)}, /* CMDTech Gobi 2000 Modem device (VU922) */ {QMI_GOBI_DEVICE(0x05c6, 0x9205)}, /* Gobi 2000 Modem device */ {QMI_GOBI_DEVICE(0x1199, 0x9013)}, /* Sierra Wireless Gobi 3000 Modem device (MC8355) */
drivers/scsi/megaraid/megaraid_mm.c +2 -0
@@ -486,6 +486,8 @@ mimd_to_kioc(mimd_t __user *umimd, mraid_mmadp_t *adp, uioc_t *kioc) pthru32->dataxferaddr = kioc->buf_paddr;if (kioc->data_dir &UIOC_WR ) { +if (pthru32->dataxferlen > kioc->xferlen) +return -EINVAL ;if (copy_from_user (kioc->buf_vaddr, kioc->user_data, pthru32->dataxferlen)) {return (-EFAULT );
drivers/scsi/scsi_scan.c +71 -41
168 lines not on this page · raw message
drivers/scsi/scsi_sysfs.c +14 -6
@@ -332,17 +332,14 @@ static void scsi_device_dev_release_usercontext(struct work_struct *work) {struct scsi_device *sdev;struct device *parent; -struct scsi_target *starget;struct list_head *this, *tmp;unsigned long flags; sdev = container_of(work, struct scsi_device, ew.work); parent = sdev->sdev_gendev.parent; - starget =to_scsi_target (parent);spin_lock_irqsave (sdev->host->host_lock, flags); - starget->reap_ref++;list_del (&sdev->siblings);list_del (&sdev->same_target_siblings);list_del (&sdev->starved_entry);
@@ -362,8 +359,6 @@ static void scsi_device_dev_release_usercontext(struct work_struct *work)/* NULL queue means the device can't be used */ sdev->request_queue =NULL ; -scsi_target_reap (scsi_target (sdev)); -kfree (sdev->inquiry);kfree (sdev);
@@ -978,6 +973,13 @@ void __scsi_remove_device(struct scsi_device *sdev) sdev->host->hostt->slave_destroy (sdev);transport_destroy_device (dev); +/* +* Paired with the kref_get() in scsi_sysfs_initialize(). We have +* remoed sysfs visibility from the device, so make the target +* invisible if this was the last device underneath it. +*/ +scsi_target_reap (scsi_target (sdev)); +put_device (dev); }
@@ -1040,7 +1042,7 @@ void scsi_remove_target(struct device *dev)continue ;if (starget->dev.parent == dev || &starget->dev == dev) {/* assuming new targets arrive at the end */ - starget->reap_ref++; +kref_get (&starget->reap_ref);spin_unlock_irqrestore (shost->host_lock, flags);if (last)scsi_target_reap (last);
@@ -1124,6 +1126,12 @@ void scsi_sysfs_device_initialize(struct scsi_device *sdev)list_add_tail (&sdev->same_target_siblings, &starget->devices);list_add_tail (&sdev->siblings, &shost->__devices);spin_unlock_irqrestore (shost->host_lock, flags); +/* +* device can now only be removed via __scsi_remove_device() so hold +* the target. Target will be held in CREATED state until something +* beneath it becomes visible (in which case it moves to RUNNING) +*/ +kref_get (&starget->reap_ref); }int scsi_is_sdev_device (const struct device *dev)
drivers/usb/class/cdc-acm.c +21 -7
@@ -1574,13 +1574,27 @@ static const struct usb_device_id acm_ids[] = { },/* Motorola H24 HSPA module: */ { USB_DEVICE(0x22b8, 0x2d91) }, /* modem */ - { USB_DEVICE(0x22b8, 0x2d92) }, /* modem + diagnostics */ - { USB_DEVICE(0x22b8, 0x2d93) }, /* modem + AT port */ - { USB_DEVICE(0x22b8, 0x2d95) }, /* modem + AT port + diagnostics */ - { USB_DEVICE(0x22b8, 0x2d96) }, /* modem + NMEA */ - { USB_DEVICE(0x22b8, 0x2d97) }, /* modem + diagnostics + NMEA */ - { USB_DEVICE(0x22b8, 0x2d99) }, /* modem + AT port + NMEA */ - { USB_DEVICE(0x22b8, 0x2d9a) }, /* modem + AT port + diagnostics + NMEA */ + { USB_DEVICE(0x22b8, 0x2d92), /* modem + diagnostics */ + .driver_info =NO_UNION_NORMAL ,/* handle only modem interface */ + }, + { USB_DEVICE(0x22b8, 0x2d93), /* modem + AT port */ + .driver_info = NO_UNION_NORMAL, /* handle only modem interface */ + }, + { USB_DEVICE(0x22b8, 0x2d95), /* modem + AT port + diagnostics */ + .driver_info = NO_UNION_NORMAL, /* handle only modem interface */ + }, + { USB_DEVICE(0x22b8, 0x2d96), /* modem + NMEA */ + .driver_info = NO_UNION_NORMAL, /* handle only modem interface */ + }, + { USB_DEVICE(0x22b8, 0x2d97), /* modem + diagnostics + NMEA */ + .driver_info = NO_UNION_NORMAL, /* handle only modem interface */ + }, + { USB_DEVICE(0x22b8, 0x2d99), /* modem + AT port + NMEA */ + .driver_info = NO_UNION_NORMAL, /* handle only modem interface */ + }, + { USB_DEVICE(0x22b8, 0x2d9a), /* modem + AT port + diagnostics + NMEA */ + .driver_info = NO_UNION_NORMAL, /* handle only modem interface */ + }, { USB_DEVICE(0x0572, 0x1329), /* Hummingbird huc56s (Conexant) */ .driver_info = NO_UNION_NORMAL, /* union descriptor misplaced on
drivers/usb/serial/cp210x.c +1 -0
@@ -104,6 +104,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x10C4, 0x8218) }, /* Lipowsky Industrie Elektronik GmbH, HARP-1 */ { USB_DEVICE(0x10C4, 0x822B) }, /* Modem EDGE(GSM) Comander 2 */ { USB_DEVICE(0x10C4, 0x826B) }, /* Cygnal Integrated Products, Inc., Fasttrax GPS demonstration module */ + { USB_DEVICE(0x10C4, 0x8281) }, /* Nanotec Plug & Drive */ { USB_DEVICE(0x10C4, 0x8293) }, /* Telegesis ETRX2USB */ { USB_DEVICE(0x10C4, 0x82F9) }, /* Procyon AVS */ { USB_DEVICE(0x10C4, 0x8341) }, /* Siemens MC35PU GPRS Modem */
drivers/usb/serial/ftdi_sio.c +33 -0
@@ -912,6 +912,39 @@ static struct usb_device_id id_table_combined [] = { { USB_DEVICE(FTDI_VID, FTDI_Z3X_PID) },/* Cressi Devices */ { USB_DEVICE(FTDI_VID, FTDI_CRESSI_PID) }, +/* Brainboxes Devices */ + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_VX_001_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_VX_012_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_VX_023_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_VX_034_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_101_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_1_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_2_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_3_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_4_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_5_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_6_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_7_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_160_8_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_257_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_279_1_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_279_2_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_279_3_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_279_4_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_313_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_324_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_346_1_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_346_2_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_357_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_606_1_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_606_2_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_606_3_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_701_1_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_701_2_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_842_1_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_842_2_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_842_3_PID) }, + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_842_4_PID) }, { }, /* Optional parameter entry */ { } /* Terminating entry */ };
drivers/usb/serial/ftdi_sio_ids.h +37 -0
@@ -1326,3 +1326,40 @@* Manufacturer: Cressi */ #define FTDI_CRESSI_PID 0x87d0 + +/* +* Brainboxes devices +*/ +#define BRAINBOXES_VID 0x05d1 +#define BRAINBOXES_VX_001_PID 0x1001/* VX-001 ExpressCard 1 Port RS232 */ +#define BRAINBOXES_VX_012_PID 0x1002/* VX-012 ExpressCard 2 Port RS232 */ +#define BRAINBOXES_VX_023_PID 0x1003/* VX-023 ExpressCard 1 Port RS422/485 */ +#define BRAINBOXES_VX_034_PID 0x1004/* VX-034 ExpressCard 2 Port RS422/485 */ +#define BRAINBOXES_US_101_PID 0x1011/* US-101 1xRS232 */ +#define BRAINBOXES_US_324_PID 0x1013/* US-324 1xRS422/485 1Mbaud */ +#define BRAINBOXES_US_606_1_PID 0x2001/* US-606 6 Port RS232 Serial Port 1 and 2 */ +#define BRAINBOXES_US_606_2_PID 0x2002/* US-606 6 Port RS232 Serial Port 3 and 4 */ +#define BRAINBOXES_US_606_3_PID 0x2003/* US-606 6 Port RS232 Serial Port 4 and 6 */ +#define BRAINBOXES_US_701_1_PID 0x2011/* US-701 4xRS232 1Mbaud Port 1 and 2 */ +#define BRAINBOXES_US_701_2_PID 0x2012/* US-701 4xRS422 1Mbaud Port 3 and 4 */ +#define BRAINBOXES_US_279_1_PID 0x2021/* US-279 8xRS422 1Mbaud Port 1 and 2 */ +#define BRAINBOXES_US_279_2_PID 0x2022/* US-279 8xRS422 1Mbaud Port 3 and 4 */ +#define BRAINBOXES_US_279_3_PID 0x2023/* US-279 8xRS422 1Mbaud Port 5 and 6 */ +#define BRAINBOXES_US_279_4_PID 0x2024/* US-279 8xRS422 1Mbaud Port 7 and 8 */ +#define BRAINBOXES_US_346_1_PID 0x3011/* US-346 4xRS422/485 1Mbaud Port 1 and 2 */ +#define BRAINBOXES_US_346_2_PID 0x3012/* US-346 4xRS422/485 1Mbaud Port 3 and 4 */ +#define BRAINBOXES_US_257_PID 0x5001/* US-257 2xRS232 1Mbaud */ +#define BRAINBOXES_US_313_PID 0x6001/* US-313 2xRS422/485 1Mbaud */ +#define BRAINBOXES_US_357_PID 0x7001/* US_357 1xRS232/422/485 */ +#define BRAINBOXES_US_842_1_PID 0x8001/* US-842 8xRS422/485 1Mbaud Port 1 and 2 */ +#define BRAINBOXES_US_842_2_PID 0x8002/* US-842 8xRS422/485 1Mbaud Port 3 and 4 */ +#define BRAINBOXES_US_842_3_PID 0x8003/* US-842 8xRS422/485 1Mbaud Port 5 and 6 */ +#define BRAINBOXES_US_842_4_PID 0x8004/* US-842 8xRS422/485 1Mbaud Port 7 and 8 */ +#define BRAINBOXES_US_160_1_PID 0x9001/* US-160 16xRS232 1Mbaud Port 1 and 2 */ +#define BRAINBOXES_US_160_2_PID 0x9002/* US-160 16xRS232 1Mbaud Port 3 and 4 */ +#define BRAINBOXES_US_160_3_PID 0x9003/* US-160 16xRS232 1Mbaud Port 5 and 6 */ +#define BRAINBOXES_US_160_4_PID 0x9004/* US-160 16xRS232 1Mbaud Port 7 and 8 */ +#define BRAINBOXES_US_160_5_PID 0x9005/* US-160 16xRS232 1Mbaud Port 9 and 10 */ +#define BRAINBOXES_US_160_6_PID 0x9006/* US-160 16xRS232 1Mbaud Port 11 and 12 */ +#define BRAINBOXES_US_160_7_PID 0x9007/* US-160 16xRS232 1Mbaud Port 13 and 14 */ +#define BRAINBOXES_US_160_8_PID 0x9008/* US-160 16xRS232 1Mbaud Port 15 and 16 */
drivers/usb/serial/io_ti.c +33 -17
128 lines not on this page · raw message
drivers/usb/serial/option.c +79 -4
136 lines not on this page · raw message
drivers/usb/serial/qcserial.c +9 -0
@@ -136,9 +136,18 @@ static const struct usb_device_id id_table[] = { {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x68a2, 0)}, /* Sierra Wireless MC7710 Device Management */ {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x68a2, 2)}, /* Sierra Wireless MC7710 NMEA */ {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x68a2, 3)}, /* Sierra Wireless MC7710 Modem */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x68c0, 0)}, /* Sierra Wireless MC73xx Device Management */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x68c0, 2)}, /* Sierra Wireless MC73xx NMEA */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x68c0, 3)}, /* Sierra Wireless MC73xx Modem */ {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901c, 0)}, /* Sierra Wireless EM7700 Device Management */ {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901c, 2)}, /* Sierra Wireless EM7700 NMEA */ {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901c, 3)}, /* Sierra Wireless EM7700 Modem */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901f, 0)}, /* Sierra Wireless EM7355 Device Management */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901f, 2)}, /* Sierra Wireless EM7355 NMEA */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901f, 3)}, /* Sierra Wireless EM7355 Modem */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9041, 0)}, /* Sierra Wireless MC7305/MC7355 Device Management */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9041, 2)}, /* Sierra Wireless MC7305/MC7355 NMEA */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9041, 3)}, /* Sierra Wireless MC7305/MC7355 Modem */ {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9051, 0)}, /* Netgear AirCard 340U Device Management */ {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9051, 2)}, /* Netgear AirCard 340U NMEA */ {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9051, 3)}, /* Netgear AirCard 340U Modem */
drivers/usb/serial/sierra.c +0 -1
@@ -291,7 +291,6 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x0f3d, 0x68A3), /* Airprime/Sierra Wireless Direct IP modems */ .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist }, - { USB_DEVICE(0x413C, 0x08133) }, /* Dell Computer Corp. Wireless 5720 VZW Mobile Broadband (EVDO Rev-A) Minicard GPS Port */ { } };
drivers/usb/serial/usb-serial.c +3 -1
@@ -1367,10 +1367,12 @@ static int usb_serial_register(struct usb_serial_driver *driver)static void usb_serial_deregister (struct usb_serial_driver *device) {pr_info ("USB Serial deregistering driver %s\n" , device->description); +mutex_lock (&table_lock);list_del (&device->driver_list); -usb_serial_bus_deregister (device);mutex_unlock (&table_lock); + +usb_serial_bus_deregister (device); }/**
drivers/usb/serial/usb_wwan.c +3 -6
@@ -470,6 +470,9 @@ int usb_wwan_port_probe(struct usb_serial_port *port)int err;int i; +if (!port->bulk_in_size || !port->bulk_out_size) +return -ENODEV ; + portdata =kzalloc (sizeof (*portdata),GFP_KERNEL );if (!portdata)return -ENOMEM ;
@@ -477,9 +480,6 @@ int usb_wwan_port_probe(struct usb_serial_port *port)init_usb_anchor (&portdata->delayed);for (i =0 ; i <N_IN_URB ; i++) { -if (!port->bulk_in_size) -break ; - buffer = (u8 *)__get_free_page (GFP_KERNEL );if (!buffer) goto bail_out_error;
@@ -493,9 +493,6 @@ int usb_wwan_port_probe(struct usb_serial_port *port) }for (i =0 ; i <N_OUT_URB ; i++) { -if (!port->bulk_out_size) -break ; - buffer =kmalloc (OUT_BUFLEN ,GFP_KERNEL );if (!buffer) goto bail_out_error2;
drivers/video/tgafb.c +12 -3
@@ -188,6 +188,8 @@ tgafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)if (var->xres_virtual != var->xres || var->yres_virtual != var->yres)return -EINVAL ; +if (var->xres * var->yres * (var->bits_per_pixel >>3 ) > info->fix.smem_len) +return -EINVAL ;if (var->nonstd)return -EINVAL ;if (1000000000 / var->pixclock >TGA_PLL_MAX_FREQ )
@@ -268,6 +270,7 @@ tgafb_set_par(struct fb_info *info) par->yres = info->var.yres; par->pll_freq = pll_freq =1000000000 / info->var.pixclock; par->bits_per_pixel = info->var.bits_per_pixel; + info->fix.line_length = par->xres * (par->bits_per_pixel >>3 ); tga_type = par->tga_type;
@@ -1314,6 +1317,7 @@ tgafb_init_fix(struct fb_info *info)int tga_bus_tc =TGA_BUS_TC (par->dev);u8 tga_type = par->tga_type;const char *tga_type_name =NULL ; +unsigned memory_size;switch (tga_type) {case TGA_TYPE_8PLANE :
@@ -1321,21 +1325,25 @@ tgafb_init_fix(struct fb_info *info) tga_type_name ="Digital ZLXp-E1" ;if (tga_bus_tc) tga_type_name ="Digital ZLX-E1" ; + memory_size =2097152 ;break ;case TGA_TYPE_24PLANE :if (tga_bus_pci) tga_type_name ="Digital ZLXp-E2" ;if (tga_bus_tc) tga_type_name ="Digital ZLX-E2" ; + memory_size =8388608 ;break ;case TGA_TYPE_24PLUSZ :if (tga_bus_pci) tga_type_name ="Digital ZLXp-E3" ;if (tga_bus_tc) tga_type_name ="Digital ZLX-E3" ; + memory_size =16777216 ;break ;default : tga_type_name ="Unknown" ; + memory_size =16777216 ;break ; }
@@ -1347,9 +1355,8 @@ tgafb_init_fix(struct fb_info *info) ? FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_DIRECTCOLOR); - info->fix.line_length = par->xres * (par->bits_per_pixel >>3 ); info->fix.smem_start = (size_t ) par->tga_fb_base; - info->fix.smem_len = info->fix.line_length * par->yres; + info->fix.smem_len = memory_size; info->fix.mmio_start = (size_t ) par->tga_regs_base; info->fix.mmio_len =512 ;
@@ -1473,6 +1480,9 @@ static int tgafb_register(struct device *dev) modedb_tga = &modedb_tc; modedbsize_tga =1 ; } + +tgafb_init_fix (info); + ret = fb_find_mode(&info->var, info, mode_option ? mode_option : mode_option_tga, modedb_tga, modedbsize_tga, NULL,
@@ -1490,7 +1500,6 @@ static int tgafb_register(struct device *dev) }tgafb_set_par (info); -tgafb_init_fix (info);if (register_framebuffer (info) <0 ) {printk (KERN_ERR "tgafb: Could not register framebuffer\n" );
fs/file_table.c +2 -2
@@ -211,10 +211,10 @@ static void drop_file_write_access(struct file *file)struct dentry *dentry = file->f_path.dentry;struct inode *inode = dentry->d_inode; -put_write_access (inode); -if (special_file (inode->i_mode))return ; + +put_write_access (inode);if (file_check_writeable (file) !=0 )return ;__mnt_drop_write (mnt);
fs/open.c +7 -19
@@ -628,23 +628,12 @@ out:static inline int __get_file_write_access (struct inode *inode,struct vfsmount *mnt) { -int error; - error =get_write_access (inode); +int error =get_write_access (inode);if (error)return error; -/* -* Do not take mount writer counts on -* special files since no writes to -* the mount itself will occur. -*/ -if (!special_file (inode->i_mode)) { -/* -* Balanced in __fput() -*/ - error =__mnt_want_write (mnt); -if (error) -put_write_access (inode); - } + error =__mnt_want_write (mnt); +if (error) +put_write_access (inode);return error; }
@@ -677,12 +666,11 @@ static int do_dentry_open(struct file *f,path_get (&f->f_path); inode = f->f_inode = f->f_path.dentry->d_inode; -if (f->f_mode &FMODE_WRITE ) { +if (f->f_mode &FMODE_WRITE && !special_file (inode->i_mode)) { error =__get_file_write_access (inode, f->f_path.mnt);if (error) goto cleanup_file; -if (!special_file (inode->i_mode)) -file_take_write (f); +file_take_write (f); } f->f_mapping = inode->i_mapping;
@@ -723,7 +711,6 @@ cleanup_all:fops_put (f->f_op);file_sb_list_del (f);if (f->f_mode &FMODE_WRITE ) { -put_write_access (inode);if (!special_file (inode->i_mode)) {/* * We don't consider this a real
@@ -731,6 +718,7 @@ cleanup_all:* because it all happenend right * here, so just reset the state. */ +put_write_access (inode);file_reset_write (f);__mnt_drop_write (f->f_path.mnt); }
include/asm-generic/pgtable.h +23 -8
@@ -620,32 +620,47 @@ static inline int pmd_numa(pmd_t pmd)#ifndef pte_mknonnumastatic inline pte_t pte_mknonnuma (pte_t pte) { - pte =pte_clear_flags (pte, _PAGE_NUMA); -return pte_set_flags (pte, _PAGE_PRESENT|_PAGE_ACCESSED); +pteval_t val =pte_val (pte); + + val &= ~_PAGE_NUMA; + val |= (_PAGE_PRESENT|_PAGE_ACCESSED); +return __pte (val); }#endif #ifndef pmd_mknonnumastatic inline pmd_t pmd_mknonnuma (pmd_t pmd) { - pmd =pmd_clear_flags (pmd, _PAGE_NUMA); -return pmd_set_flags (pmd, _PAGE_PRESENT|_PAGE_ACCESSED); +pmdval_t val =pmd_val (pmd); + + val &= ~_PAGE_NUMA; + val |= (_PAGE_PRESENT|_PAGE_ACCESSED); + +return __pmd (val); }#endif #ifndef pte_mknumastatic inline pte_t pte_mknuma (pte_t pte) { - pte =pte_set_flags (pte, _PAGE_NUMA); -return pte_clear_flags (pte, _PAGE_PRESENT); +pteval_t val =pte_val (pte); + + val &= ~_PAGE_PRESENT; + val |= _PAGE_NUMA; + +return __pte (val); }#endif #ifndef pmd_mknumastatic inline pmd_t pmd_mknuma (pmd_t pmd) { - pmd =pmd_set_flags (pmd, _PAGE_NUMA); -return pmd_clear_flags (pmd, _PAGE_PRESENT); +pmdval_t val =pmd_val (pmd); + + val &= ~_PAGE_PRESENT; + val |= _PAGE_NUMA; + +return __pmd (val); }#endif #else
include/linux/list.h +16 -0
@@ -373,6 +373,22 @@ static inline void list_splice_tail_init(struct list_head *list, (!list_empty (ptr) ?list_first_entry (ptr, type, member) :NULL )/** +* list_next_entry - get the next element in list +* @pos: the type * to cursor +* @member: the name of the list_struct within the struct. + */ +#define list_next_entry (pos, member) \ + list_entry((pos)->member.next, typeof(*(pos)), member) + +/** +* list_prev_entry - get the prev element in list +* @pos: the type * to cursor +* @member: the name of the list_struct within the struct. +*/ +#define list_prev_entry (pos, member) \ + list_entry((pos)->member.prev, typeof(*(pos)), member) + +/** * list_for_each - iterate over a list * @pos: the &struct list_head to use as a loop cursor. * @head: the head for your list.
include/linux/sock_diag.h +1 -1
@@ -23,7 +23,7 @@ int sock_diag_check_cookie(void *sk, __u32 *cookie);void sock_diag_save_cookie (void *sk,__u32 *cookie);int sock_diag_put_meminfo (struct sock *sk,struct sk_buff *skb,int attr); -int sock_diag_put_filterinfo (struct user_namespace *user_ns,struct sock *sk, +int sock_diag_put_filterinfo (struct sock *sk,struct sk_buff *skb,int attrtype);#endif
include/net/ip6_route.h +5 -0
@@ -32,6 +32,11 @@ struct route_info {#define RT6_LOOKUP_F_SRCPREF_PUBLIC 0x00000010#define RT6_LOOKUP_F_SRCPREF_COA 0x00000020 +/* We do not (yet ?) support IPv6 jumbograms (RFC 2675) +* Unlike IPv4, hdr->seg_len doesn't include the IPv6 header +*/ +#define IP6_MAX_MTU (0xFFFF + sizeof(struct ipv6hdr)) +/* * rt6_srcprefs2flags() and rt6_flags2srcprefs() translate * between IPV6_ADDR_PREFERENCES socket option values
include/net/netfilter/nf_conntrack_extend.h +2 -2
@@ -41,8 +41,8 @@ enum nf_ct_ext_id {/* Extensions: optional stuff which isn't permanently in struct. */ struct nf_ct_ext {struct rcu_head rcu; -u8 offset[NF_CT_EXT_NUM ]; -u8 len; +u16 offset[NF_CT_EXT_NUM ]; +u16 len;char data[0 ]; };
include/net/sctp/structs.h +3 -1
@@ -1252,6 +1252,7 @@ struct sctp_endpoint {/* SCTP-AUTH: endpoint shared keys */ struct list_head endpoint_shared_keys;__u16 active_key_id; +__u8 auth_enable; };/* Recover the outter endpoint structure. */
@@ -1280,7 +1281,8 @@ struct sctp_endpoint *sctp_endpoint_is_match(struct sctp_endpoint *,int sctp_has_association (struct net *net,const union sctp_addr *laddr,const union sctp_addr *paddr); -int sctp_verify_init (struct net *net,const struct sctp_association *asoc, +int sctp_verify_init (struct net *net,const struct sctp_endpoint *ep, +const struct sctp_association *asoc,sctp_cid_t ,sctp_init_chunk_t *peer_init,struct sctp_chunk *chunk,struct sctp_chunk **err_chunk); int sctp_process_init(struct sctp_association *, struct sctp_chunk *chunk,
include/scsi/scsi_device.h +1 -2
@@ -248,7 +248,7 @@ struct scsi_target {struct list_head siblings;struct list_head devices;struct device dev; -unsigned int reap_ref;/* protected by the host lock */ +struct kref reap_ref;/* last put renders target invisible */ unsigned int channel;unsigned int id;/* target id ... replace * scsi_device.id eventually */
@@ -272,7 +272,6 @@ struct scsi_target {#define SCSI_DEFAULT_TARGET_BLOCKED 3char scsi_level; -struct execute_work ew;enum scsi_target_state state;void *hostdata;/* available to low-level driver */ unsigned long starget_data[0 ];/* for the transport */
include/trace/events/block.h +30 -3
@@ -132,6 +132,7 @@ DEFINE_EVENT(block_rq_with_error, block_rq_requeue,* block_rq_complete - block IO operation completed by device driver * @q: queue containing the block operation request * @rq: block operations request +* @nr_bytes: number of completed bytes * * The block_rq_complete tracepoint event indicates that some portion * of operation request has been completed by the device driver. If
@@ -139,11 +140,37 @@ DEFINE_EVENT(block_rq_with_error, block_rq_requeue,* do for the request. If @rq->bio is non-NULL then there is * additional work required to complete the request. */ -DEFINE_EVENT (block_rq_with_error, block_rq_complete, +TRACE_EVENT (block_rq_complete, - TP_PROTO(struct request_queue *q, struct request *rq), + TP_PROTO(struct request_queue *q, struct request *rq, + unsigned int nr_bytes), -TP_ARGS (q, rq) +TP_ARGS (q, rq, nr_bytes), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( sector_t, sector ) + __field( unsigned int, nr_sector ) + __field( int, errors ) + __array( char, rwbs, RWBS_LEN ) +__dynamic_array ( char, cmd,blk_cmd_buf_len (rq) ) + ), + +TP_fast_assign ( + __entry->dev = rq->rq_disk ? disk_devt(rq->rq_disk) : 0; + __entry->sector = blk_rq_pos(rq); + __entry->nr_sector = nr_bytes >> 9; + __entry->errors = rq->errors; + + blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, nr_bytes); + blk_dump_cmd(__get_str(cmd), rq); + ), + +TP_printk ("%d,%d %s (%s) %llu + %u [%d]" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->rwbs,__get_str (cmd), + (unsigned long long )__entry->sector, + __entry->nr_sector, __entry->errors) ); DECLARE_EVENT_CLASS(block_rq,
kernel/events/core.c +0 -3
@@ -2016,9 +2016,6 @@ static void __perf_event_sync_stat(struct perf_event *event,perf_event_update_userpage (next_event); } -#define list_next_entry (pos, member) \ - list_entry(pos->member.next, typeof(*pos), member) -static void perf_event_sync_stat (struct perf_event_context *ctx,struct perf_event_context *next_ctx) {
kernel/trace/blktrace.c +11 -9
@@ -685,6 +685,7 @@ void blk_trace_shutdown(struct request_queue *q)* blk_add_trace_rq - Add a trace for a request oriented action * @q: queue the io is for * @rq: the source request +* @nr_bytes: number of completed bytes * @what: the action * * Description:
@@ -692,7 +693,7 @@ void blk_trace_shutdown(struct request_queue *q)* **/ static void blk_add_trace_rq (struct request_queue *q,struct request *rq, -u32 what) +unsigned int nr_bytes,u32 what) {struct blk_trace *bt = q->blk_trace;
@@ -701,11 +702,11 @@ static void blk_add_trace_rq(struct request_queue *q, struct request *rq,if (rq->cmd_type ==REQ_TYPE_BLOCK_PC ) { what |=BLK_TC_ACT (BLK_TC_PC ); -__blk_add_trace (bt,0 ,blk_rq_bytes (rq), rq->cmd_flags, +__blk_add_trace (bt,0 , nr_bytes, rq->cmd_flags, what, rq->errors, rq->cmd_len, rq->cmd); }else { what |=BLK_TC_ACT (BLK_TC_FS ); -__blk_add_trace (bt,blk_rq_pos (rq),blk_rq_bytes (rq), +__blk_add_trace (bt,blk_rq_pos (rq), nr_bytes, rq->cmd_flags, what, rq->errors,0 ,NULL ); } }
@@ -713,33 +714,34 @@ static void blk_add_trace_rq(struct request_queue *q, struct request *rq,static void blk_add_trace_rq_abort (void *ignore,struct request_queue *q,struct request *rq) { -blk_add_trace_rq (q, rq,BLK_TA_ABORT ); +blk_add_trace_rq (q, rq,blk_rq_bytes (rq),BLK_TA_ABORT ); }static void blk_add_trace_rq_insert (void *ignore,struct request_queue *q,struct request *rq) { -blk_add_trace_rq (q, rq,BLK_TA_INSERT ); +blk_add_trace_rq (q, rq,blk_rq_bytes (rq),BLK_TA_INSERT ); }static void blk_add_trace_rq_issue (void *ignore,struct request_queue *q,struct request *rq) { -blk_add_trace_rq (q, rq,BLK_TA_ISSUE ); +blk_add_trace_rq (q, rq,blk_rq_bytes (rq),BLK_TA_ISSUE ); }static void blk_add_trace_rq_requeue (void *ignore,struct request_queue *q,struct request *rq) { -blk_add_trace_rq (q, rq,BLK_TA_REQUEUE ); +blk_add_trace_rq (q, rq,blk_rq_bytes (rq),BLK_TA_REQUEUE ); }static void blk_add_trace_rq_complete (void *ignore,struct request_queue *q, -struct request *rq) +struct request *rq, +unsigned int nr_bytes) { -blk_add_trace_rq (q, rq,BLK_TA_COMPLETE ); +blk_add_trace_rq (q, rq, nr_bytes,BLK_TA_COMPLETE ); }/**
kernel/tracepoint.c +6 -0
@@ -641,6 +641,9 @@ static int tracepoint_module_coming(struct module *mod)struct tp_module *tp_mod, *iter;int ret =0 ; +if (!mod->num_tracepoints) +return 0 ; +/* * We skip modules that taint the kernel, especially those with different * module headers (for forced load), to make sure we don't cause a crash.
@@ -684,6 +687,9 @@ static int tracepoint_module_going(struct module *mod) {struct tp_module *pos; +if (!mod->num_tracepoints) +return 0 ; +mutex_lock (&tracepoints_mutex);tracepoint_update_probe_range (mod->tracepoints_ptrs, mod->tracepoints_ptrs + mod->num_tracepoints);
mm/hugetlb.c +1 -0
@@ -1100,6 +1100,7 @@ static void return_unused_surplus_pages(struct hstate *h,while (nr_pages--) {if (!free_pool_huge_page (h, &node_states[N_MEMORY ],1 ))break ; +cond_resched_lock (&hugetlb_lock); } }
net/8021q/vlan_dev.c +41 -5
60 lines not on this page · raw message
net/bridge/br_input.c +1 -1
@@ -71,7 +71,7 @@ int br_handle_frame_finish(struct sk_buff *skb) goto drop;if (!br_allowed_ingress (p->br,nbp_get_vlan_info (p), skb, &vid)) - goto drop; + goto out;/* insert into forwarding database after filtering to avoid spoofing */ br = p->br;
net/bridge/br_netlink.c +15 -0
@@ -438,6 +438,20 @@ static int br_validate(struct nlattr *tb[], struct nlattr *data[])return 0 ; } +static int br_dev_newlink (struct net *src_net,struct net_device *dev, +struct nlattr *tb[],struct nlattr *data[]) +{ +struct net_bridge *br =netdev_priv (dev); + +if (tb[IFLA_ADDRESS ]) { +spin_lock_bh (&br->lock); +br_stp_change_bridge_id (br,nla_data (tb[IFLA_ADDRESS ])); +spin_unlock_bh (&br->lock); + } + +return register_netdevice (dev); +} +static size_t br_get_link_af_size (const struct net_device *dev) {struct net_port_vlans *pv;
@@ -466,6 +480,7 @@ struct rtnl_link_ops br_link_ops __read_mostly = { .priv_size = sizeof(struct net_bridge), .setup = br_dev_setup, .validate = br_validate, + .newlink = br_dev_newlink, .dellink = br_dev_delete, };
net/bridge/br_vlan.c +4 -3
@@ -202,7 +202,7 @@ bool br_allowed_ingress(struct net_bridge *br, struct net_port_vlans *v,* rejected. */ if (!v) -return false; + goto drop;if (br_vlan_get_tag (skb, vid)) {u16 pvid =br_get_pvid (v);
@@ -212,7 +212,7 @@ bool br_allowed_ingress(struct net_bridge *br, struct net_port_vlans *v,* traffic belongs to. */ if (pvid ==VLAN_N_VID ) -return false; + goto drop;/* PVID is set on this port. Any untagged ingress * frame is considered to belong to this vlan.
@@ -224,7 +224,8 @@ bool br_allowed_ingress(struct net_bridge *br, struct net_port_vlans *v,/* Frame had a valid vlan tag. See if vlan is allowed */ if (test_bit (*vid, v->vlan_bitmap))return true; - +drop: +kfree_skb (skb);return false; }
net/bridge/netfilter/ebtables.c +2 -3
@@ -1044,10 +1044,9 @@ static int do_replace_finish(struct net *net, struct ebt_replace *repl,if (repl->num_counters &©_to_user (repl->counters, counterstmp, repl->num_counters *sizeof (struct ebt_counter ))) { - ret = -EFAULT ; +/* Silent error, can't fail, new table is already in place */ +net_warn_ratelimited ("ebtables: counters copy to user failed while replacing table\n" ); } -else - ret =0 ;/* decrease module count and free resources */ EBT_ENTRY_ITERATE(table->entries, table->entries_size,
net/core/dev.c +2 -0
@@ -3898,6 +3898,7 @@ static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb) skb->vlan_tci =0 ; skb->dev = napi->dev; skb->skb_iif =0 ; + skb->truesize =SKB_TRUESIZE (skb_end_offset (skb)); napi->skb = skb; }
@@ -4634,6 +4635,7 @@ void __dev_set_rx_mode(struct net_device *dev)if (ops->ndo_set_rx_mode) ops->ndo_set_rx_mode (dev); } +EXPORT_SYMBOL (__dev_set_rx_mode);void dev_set_rx_mode (struct net_device *dev) {
net/core/filter.c +5 -1
@@ -355,6 +355,8 @@ load_b:if (skb_is_nonlinear (skb))return 0 ; +if (skb->len <sizeof (struct nlattr )) +return 0 ;if (A > skb->len -sizeof (struct nlattr ))return 0 ;
@@ -371,11 +373,13 @@ load_b:if (skb_is_nonlinear (skb))return 0 ; +if (skb->len <sizeof (struct nlattr )) +return 0 ;if (A > skb->len -sizeof (struct nlattr ))return 0 ; nla = (struct nlattr *)&skb->data[A ]; -if (nla->nla_len >A - skb->len) +if (nla->nla_len > skb->len -A )return 0 ; nla =nla_find_nested (nla,X );
net/core/rtnetlink.c +22 -11
@@ -714,7 +714,8 @@ static inline int rtnl_vfinfo_size(const struct net_device *dev,return 0 ; } -static size_t rtnl_port_size (const struct net_device *dev) +static size_t rtnl_port_size (const struct net_device *dev, +u32 ext_filter_mask) {size_t port_size =nla_total_size (4 )/* PORT_VF */ +nla_total_size (PORT_PROFILE_MAX )/* PORT_PROFILE */
@@ -730,7 +731,8 @@ static size_t rtnl_port_size(const struct net_device *dev)size_t port_self_size =nla_total_size (sizeof (struct nlattr )) + port_size; -if (!dev->netdev_ops->ndo_get_vf_port || !dev->dev.parent) +if (!dev->netdev_ops->ndo_get_vf_port || !dev->dev.parent || + !(ext_filter_mask &RTEXT_FILTER_VF ))return 0 ;if (dev_num_vf (dev->dev.parent)) return port_self_size + vf_ports_size +
@@ -765,7 +767,7 @@ static noinline size_t if_nlmsg_size(const struct net_device *dev, +nla_total_size (ext_filter_mask &RTEXT_FILTER_VF ?4 :0 )/* IFLA_NUM_VF */ +rtnl_vfinfo_size (dev, ext_filter_mask)/* IFLA_VFINFO_LIST */ - +rtnl_port_size (dev)/* IFLA_VF_PORTS + IFLA_PORT_SELF */ + +rtnl_port_size (dev, ext_filter_mask)/* IFLA_VF_PORTS + IFLA_PORT_SELF */ +rtnl_link_get_size (dev)/* IFLA_LINKINFO */ +rtnl_link_get_af_size (dev);/* IFLA_AF_SPEC */ }
@@ -826,11 +828,13 @@ static int rtnl_port_self_fill(struct sk_buff *skb, struct net_device *dev)return 0 ; } -static int rtnl_port_fill (struct sk_buff *skb,struct net_device *dev) +static int rtnl_port_fill (struct sk_buff *skb,struct net_device *dev, +u32 ext_filter_mask) {int err; -if (!dev->netdev_ops->ndo_get_vf_port || !dev->dev.parent) +if (!dev->netdev_ops->ndo_get_vf_port || !dev->dev.parent || + !(ext_filter_mask &RTEXT_FILTER_VF ))return 0 ; err =rtnl_port_self_fill (skb, dev);
@@ -985,7 +989,7 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,nla_nest_end (skb, vfinfo); } -if (rtnl_port_fill (skb, dev)) +if (rtnl_port_fill (skb, dev, ext_filter_mask)) goto nla_put_failure;if (dev->rtnl_link_ops) {
@@ -1039,6 +1043,7 @@ static int rtnl_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)struct hlist_head *head;struct nlattr *tb[IFLA_MAX +1 ];u32 ext_filter_mask =0 ; +int err; s_h = cb->args[0 ]; s_idx = cb->args[1 ];
@@ -1059,11 +1064,17 @@ static int rtnl_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)hlist_for_each_entry_rcu (dev, head, index_hlist) {if (idx < s_idx) goto cont; -if (rtnl_fill_ifinfo (skb, dev,RTM_NEWLINK , -NETLINK_CB (cb->skb).portid, - cb->nlh->nlmsg_seq,0 , -NLM_F_MULTI , - ext_filter_mask) <=0 ) + err =rtnl_fill_ifinfo (skb, dev,RTM_NEWLINK , +NETLINK_CB (cb->skb).portid, + cb->nlh->nlmsg_seq,0 , +NLM_F_MULTI , + ext_filter_mask); +/* If we ran out of room on the first message, +* we're in trouble +*/ +WARN_ON ((err == -EMSGSIZE ) && (skb->len ==0 )); + +if (err <=0 ) goto out;nl_dump_check_consistent (cb,nlmsg_hdr (skb));
net/core/skbuff.c +7 -5
@@ -3487,12 +3487,14 @@ EXPORT_SYMBOL(skb_try_coalesce);unsigned int skb_gso_transport_seglen (const struct sk_buff *skb) {const struct skb_shared_info *shinfo =skb_shinfo (skb); -unsigned int hdr_len;if (likely (shinfo->gso_type & (SKB_GSO_TCPV4 |SKB_GSO_TCPV6 ))) - hdr_len =tcp_hdrlen (skb); -else - hdr_len =sizeof (struct udphdr ); -return hdr_len + shinfo->gso_size; +return tcp_hdrlen (skb) + shinfo->gso_size; + +/* UFO sets gso_size to the size of the fragmentation +* payload, i.e. the size of the L4 (UDP) header is already +* accounted for. +*/ +return shinfo->gso_size; }EXPORT_SYMBOL_GPL (skb_gso_transport_seglen);
net/core/sock_diag.c +2 -2
@@ -49,7 +49,7 @@ int sock_diag_put_meminfo(struct sock *sk, struct sk_buff *skb, int attrtype) }EXPORT_SYMBOL_GPL (sock_diag_put_meminfo); -int sock_diag_put_filterinfo (struct user_namespace *user_ns,struct sock *sk, +int sock_diag_put_filterinfo (struct sock *sk,struct sk_buff *skb,int attrtype) {struct nlattr *attr;
@@ -57,7 +57,7 @@ int sock_diag_put_filterinfo(struct user_namespace *user_ns, struct sock *sk,unsigned int len;int err =0 ; -if (!ns_capable (user_ns,CAP_NET_ADMIN )) { +if (!ns_capable (sock_net (sk)->user_ns,CAP_NET_ADMIN )) {nla_reserve (skb, attrtype,0 );return 0 ; }
net/ipv4/fib_semantics.c +1 -1
@@ -818,13 +818,13 @@ struct fib_info *fib_create_info(struct fib_config *cfg) fi =kzalloc (sizeof (*fi)+nhs*sizeof (struct fib_nh ),GFP_KERNEL );if (fi ==NULL ) goto failure; + fib_info_cnt++;if (cfg->fc_mx) { fi->fib_metrics =kzalloc (sizeof (u32) *RTAX_MAX ,GFP_KERNEL );if (!fi->fib_metrics) goto failure; }else fi->fib_metrics = (u32 *) dst_default_metrics; - fib_info_cnt++; fi->fib_net =hold_net (net); fi->fib_protocol = cfg->fc_protocol;
net/ipv4/ip_forward.c +2 -2
@@ -42,12 +42,12 @@static bool ip_may_fragment (const struct sk_buff *skb) {return unlikely ((ip_hdr (skb)->frag_off &htons (IP_DF )) ==0 ) || - !skb->local_df; + skb->local_df; }static bool ip_exceeds_mtu (const struct sk_buff *skb,unsigned int mtu) { -if (skb->len <= mtu || skb->local_df) +if (skb->len <= mtu)return false;if (skb_is_gso (skb) &&skb_gso_network_seglen (skb) <= mtu)
net/ipv4/ip_gre.c +1 -1
@@ -652,6 +652,7 @@ static const struct net_device_ops ipgre_netdev_ops = {static void ipgre_tunnel_setup (struct net_device *dev) { dev->netdev_ops = &ipgre_netdev_ops; + dev->type =ARPHRD_IPGRE ;ip_tunnel_setup (dev, ipgre_net_id); }
@@ -690,7 +691,6 @@ static int ipgre_tunnel_init(struct net_device *dev)memcpy (dev->dev_addr, &iph->saddr,4 );memcpy (dev->broadcast, &iph->daddr,4 ); - dev->type =ARPHRD_IPGRE ; dev->flags =IFF_NOARP ; dev->priv_flags &= ~IFF_XMIT_DST_RELEASE ; dev->addr_len =4 ;
net/ipv4/ip_vti.c +1 -1
@@ -579,9 +579,9 @@ static void vti_dev_free(struct net_device *dev)static void vti_tunnel_setup (struct net_device *dev) { dev->netdev_ops = &vti_netdev_ops; + dev->type =ARPHRD_TUNNEL ; dev->destructor = vti_dev_free; - dev->type =ARPHRD_TUNNEL ; dev->hard_header_len =LL_MAX_HEADER +sizeof (struct iphdr ); dev->mtu =ETH_DATA_LEN ; dev->flags =IFF_NOARP ;
net/ipv4/netfilter/arp_tables.c +4 -2
@@ -1039,8 +1039,10 @@ static int __do_replace(struct net *net, const char *name,xt_free_table_info (oldinfo);if (copy_to_user (counters_ptr, counters, -sizeof (struct xt_counters ) * num_counters) !=0 ) - ret = -EFAULT ; +sizeof (struct xt_counters ) * num_counters) !=0 ) { +/* Silent error, can't fail, new table is already in place */ +net_warn_ratelimited ("arptables: counters copy to user failed while replacing table\n" ); + }vfree (counters);xt_table_unlock (t);return ret;
net/ipv4/netfilter/ip_tables.c +4 -2
@@ -1226,8 +1226,10 @@ __do_replace(struct net *net, const char *name, unsigned int valid_hooks,xt_free_table_info (oldinfo);if (copy_to_user (counters_ptr, counters, -sizeof (struct xt_counters ) * num_counters) !=0 ) - ret = -EFAULT ; +sizeof (struct xt_counters ) * num_counters) !=0 ) { +/* Silent error, can't fail, new table is already in place */ +net_warn_ratelimited ("iptables: counters copy to user failed while replacing table\n" ); + }vfree (counters);xt_table_unlock (t);return ret;
net/ipv4/ping.c +11 -4
@@ -204,26 +204,33 @@ static int ping_init_sock(struct sock *sk) {struct net *net =sock_net (sk);kgid_t group =current_egid (); -struct group_info *group_info =get_current_groups (); -int i, j, count = group_info->ngroups; +struct group_info *group_info; +int i, j, count;kgid_t low, high; +int ret =0 ;inet_get_ping_group_range_net (net, &low, &high);if (gid_lte (low, group) &&gid_lte (group, high))return 0 ; + group_info =get_current_groups (); + count = group_info->ngroups;for (i =0 ; i < group_info->nblocks; i++) {int cp_count =min_t (int,NGROUPS_PER_BLOCK , count);for (j =0 ; j < cp_count; j++) {kgid_t gid = group_info->blocks[i][j];if (gid_lte (low, gid) &&gid_lte (gid, high)) -return 0 ; + goto out_release_group; } count -= cp_count; } -return -EACCES ; + ret = -EACCES ; + +out_release_group: +put_group_info (group_info); +return ret; }static void ping_close (struct sock *sk,long timeout)
net/ipv4/route.c +2 -2
@@ -1478,7 +1478,7 @@ static int __mkroute_input(struct sk_buff *skb,struct in_device *out_dev;unsigned int flags =0 ;bool do_cache; -u32 itag; +u32 itag =0 ;/* get a working reference to the output device */ out_dev =__in_dev_get_rcu (FIB_RES_DEV (*res));
@@ -2306,7 +2306,7 @@ static int rt_fill_info(struct net *net, __be32 dst, __be32 src, } } else#endif -if (nla_put_u32 (skb,RTA_IIF , rt->rt_iif)) +if (nla_put_u32 (skb,RTA_IIF , skb->dev->ifindex)) goto nla_put_failure; }
net/ipv4/tcp_cubic.c +1 -1
@@ -408,7 +408,7 @@ static void bictcp_acked(struct sock *sk, u32 cnt, s32 rtt_us) ratio -= ca->delayed_ack >>ACK_RATIO_SHIFT ; ratio += cnt; - ca->delayed_ack =min (ratio,ACK_RATIO_LIMIT ); + ca->delayed_ack =clamp (ratio,1U ,ACK_RATIO_LIMIT ); }/* Some calls are for duplicates without timetamps */
net/ipv6/ip6_fib.c +2 -1
@@ -1418,7 +1418,7 @@ static int fib6_walk_continue(struct fib6_walker_t *w)if (w->skip) { w->skip--; -continue ; + goto skip; } err = w->func (w);
@@ -1428,6 +1428,7 @@ static int fib6_walk_continue(struct fib6_walker_t *w) w->count++;continue ; } +skip: w->state =FWS_U ;case FWS_U :if (fn == w->root)
net/ipv6/ip6_gre.c +10 -0
@@ -1549,6 +1549,15 @@ static int ip6gre_changelink(struct net_device *dev, struct nlattr *tb[],return 0 ; } +static void ip6gre_dellink (struct net_device *dev,struct list_head *head) +{ +struct net *net =dev_net (dev); +struct ip6gre_net *ign =net_generic (net, ip6gre_net_id); + +if (dev != ign->fb_tunnel_dev) +unregister_netdevice_queue (dev, head); +} +static size_t ip6gre_get_size (const struct net_device *dev) {return
@@ -1626,6 +1635,7 @@ static struct rtnl_link_ops ip6gre_link_ops __read_mostly = { .validate = ip6gre_tunnel_validate, .newlink = ip6gre_newlink, .changelink = ip6gre_changelink, + .dellink = ip6gre_dellink, .get_size = ip6gre_get_size, .fill_info = ip6gre_fill_info, };
net/ipv6/ip6_output.c +5 -1
@@ -347,12 +347,16 @@ static inline int ip6_forward_finish(struct sk_buff *skb)static bool ip6_pkt_too_big (const struct sk_buff *skb,unsigned int mtu) { -if (skb->len <= mtu || skb->local_df) +if (skb->len <= mtu)return false; +/* ipv6 conntrack defrag sets max_frag_size + local_df */ if (IP6CB (skb)->frag_max_size &&IP6CB (skb)->frag_max_size > mtu)return true; +if (skb->local_df) +return false; +if (skb_is_gso (skb) &&skb_gso_network_seglen (skb) <= mtu)return false;
net/ipv6/ip6_tunnel.c +1 -1
@@ -1531,7 +1531,7 @@ static int ip6_tnl_validate(struct nlattr *tb[], struct nlattr *data[]) {u8 proto; -if (!data) +if (!data || !data[IFLA_IPTUN_PROTO ])return 0 ; proto =nla_get_u8 (data[IFLA_IPTUN_PROTO ]);
net/ipv6/netfilter/ip6_tables.c +4 -2
@@ -1236,8 +1236,10 @@ __do_replace(struct net *net, const char *name, unsigned int valid_hooks,xt_free_table_info (oldinfo);if (copy_to_user (counters_ptr, counters, -sizeof (struct xt_counters ) * num_counters) !=0 ) - ret = -EFAULT ; +sizeof (struct xt_counters ) * num_counters) !=0 ) { +/* Silent error, can't fail, new table is already in place */ +net_warn_ratelimited ("ip6tables: counters copy to user failed while replacing table\n" ); + }vfree (counters);xt_table_unlock (t);return ret;
net/ipv6/route.c +3 -2
@@ -1236,7 +1236,7 @@ static unsigned int ip6_mtu(const struct dst_entry *dst)unsigned int mtu =dst_metric_raw (dst,RTAX_MTU );if (mtu) -return mtu; + goto out; mtu =IPV6_MIN_MTU ;
@@ -1246,7 +1246,8 @@ static unsigned int ip6_mtu(const struct dst_entry *dst) mtu = idev->cnf.mtu6;rcu_read_unlock (); -return mtu; +out: + return min_t(unsigned int, mtu, IP6_MAX_MTU); }static struct dst_entry *icmp6_dst_gc_list;
net/l2tp/l2tp_ppp.c +2 -2
@@ -754,9 +754,9 @@ static int pppol2tp_connect(struct socket *sock, struct sockaddr *uservaddr, session->deref = pppol2tp_session_sock_put;/* If PMTU discovery was enabled, use the MTU that was discovered */ - dst =sk_dst_get (sk); + dst =sk_dst_get (tunnel->sock);if (dst !=NULL ) { -u32 pmtu =dst_mtu (__sk_dst_get (sk)); +u32 pmtu =dst_mtu (__sk_dst_get (tunnel->sock));if (pmtu !=0 ) session->mtu = session->mru = pmtu -PPPOL2TP_HEADER_OVERHEAD ;
net/packet/diag.c +1 -1
@@ -171,7 +171,7 @@ static int sk_diag_fill(struct sock *sk, struct sk_buff *skb, goto out_nlmsg_trim;if ((req->pdiag_show &PACKET_SHOW_FILTER ) && -sock_diag_put_filterinfo (user_ns, sk, skb,PACKET_DIAG_FILTER )) +sock_diag_put_filterinfo (sk, skb,PACKET_DIAG_FILTER )) goto out_nlmsg_trim;return nlmsg_end (skb, nlh);
net/sctp/auth.c +6 -11
@@ -393,14 +393,13 @@ nomem:*/ int sctp_auth_asoc_init_active_key (struct sctp_association *asoc,gfp_t gfp) { -struct net *net =sock_net (asoc->base.sk);struct sctp_auth_bytes *secret;struct sctp_shared_key *ep_key;/* If we don't support AUTH, or peer is not capable * we don't need to do anything. */ -if (!net->sctp.auth_enable || !asoc->peer.auth_capable) +if (!asoc->ep->auth_enable || !asoc->peer.auth_capable)return 0 ;/* If the key_id is non-zero and we couldn't find an
@@ -447,16 +446,16 @@ struct sctp_shared_key *sctp_auth_get_shkey(*/ int sctp_auth_init_hmacs (struct sctp_endpoint *ep,gfp_t gfp) { -struct net *net =sock_net (ep->base.sk);struct crypto_hash *tfm =NULL ;__u16 id; -/* if the transforms are already allocted, we are done */ -if (!net->sctp.auth_enable) { +/* If AUTH extension is disabled, we are done */ +if (!ep->auth_enable) { ep->auth_hmacs =NULL ;return 0 ; } +/* If the transforms are already allocated, we are done */ if (ep->auth_hmacs)return 0 ;
@@ -677,12 +676,10 @@ static int __sctp_auth_cid(sctp_cid_t chunk, struct sctp_chunks_param *param)/* Check if peer requested that this chunk is authenticated */ int sctp_auth_send_cid (sctp_cid_t chunk,const struct sctp_association *asoc) { -struct net *net;if (!asoc)return 0 ; - net =sock_net (asoc->base.sk); -if (!net->sctp.auth_enable || !asoc->peer.auth_capable) +if (!asoc->ep->auth_enable || !asoc->peer.auth_capable)return 0 ;return __sctp_auth_cid (chunk, asoc->peer.peer_chunks);
@@ -691,12 +688,10 @@ int sctp_auth_send_cid(sctp_cid_t chunk, const struct sctp_association *asoc)/* Check if we requested that peer authenticate this chunk. */ int sctp_auth_recv_cid (sctp_cid_t chunk,const struct sctp_association *asoc) { -struct net *net;if (!asoc)return 0 ; - net =sock_net (asoc->base.sk); -if (!net->sctp.auth_enable) +if (!asoc->ep->auth_enable)return 0 ; return __sctp_auth_cid(chunk,
net/sctp/endpointola.c +2 -1
@@ -75,7 +75,8 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep,if (!ep->digest)return NULL ; -if (net->sctp.auth_enable) { + ep->auth_enable = net->sctp.auth_enable; +if (ep->auth_enable) {/* Allocate space for HMACS and CHUNKS authentication * variables. There are arrays that we encode directly * into parameters to make the rest of the operations easier.
net/sctp/protocol.c +6 -1
@@ -498,8 +498,13 @@ static void sctp_v4_get_dst(struct sctp_transport *t, union sctp_addr *saddr,continue ;if ((laddr->state ==SCTP_ADDR_SRC ) && (AF_INET == laddr->a.sa.sa_family)) { - fl4->saddr = laddr->a.v4.sin_addr.s_addr; fl4->fl4_sport = laddr->a.v4.sin_port; +flowi4_update_output (fl4, + asoc->base.sk->sk_bound_dev_if, +RT_CONN_FLAGS (asoc->base.sk), + daddr->v4.sin_addr.s_addr, + laddr->a.v4.sin_addr.s_addr); + rt =ip_route_output_key (sock_net (sk), fl4);if (!IS_ERR (rt)) { dst = &rt->dst;
net/sctp/sm_make_chunk.c +17 -15
@@ -199,6 +199,7 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc, gfp_t gfp, int vparam_len) {struct net *net =sock_net (asoc->base.sk); +struct sctp_endpoint *ep = asoc->ep;sctp_inithdr_t init;union sctp_params addrs;size_t chunksize;
@@ -258,7 +259,7 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc, chunksize += vparam_len;/* Account for AUTH related parameters */ -if (net->sctp.auth_enable) { +if (ep->auth_enable) {/* Add random parameter length*/ chunksize +=sizeof (asoc->c.auth_random);
@@ -343,7 +344,7 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc, }/* Add SCTP-AUTH chunks to the parameter list */ -if (net->sctp.auth_enable) { +if (ep->auth_enable) {sctp_addto_chunk (retval,sizeof (asoc->c.auth_random), asoc->c.auth_random);if (auth_hmacs)
@@ -1995,7 +1996,7 @@ static void sctp_process_ext_param(struct sctp_association *asoc,/* if the peer reports AUTH, assume that he * supports AUTH. */ -if (net->sctp.auth_enable) +if (asoc->ep->auth_enable) asoc->peer.auth_capable =1 ;break ;case SCTP_CID_ASCONF :
@@ -2087,6 +2088,7 @@ static sctp_ierror_t sctp_process_unk_param(const struct sctp_association *asoc,* SCTP_IERROR_NO_ERROR - continue with the chunk */ static sctp_ierror_t sctp_verify_param(struct net *net, + const struct sctp_endpoint *ep, const struct sctp_association *asoc, union sctp_params param, sctp_cid_t cid,
@@ -2137,7 +2139,7 @@ static sctp_ierror_t sctp_verify_param(struct net *net, goto fallthrough;case SCTP_PARAM_RANDOM : -if (!net->sctp.auth_enable) +if (!ep->auth_enable) goto fallthrough;/* SCTP-AUTH: Secion 6.1
@@ -2154,7 +2156,7 @@ static sctp_ierror_t sctp_verify_param(struct net *net,break ;case SCTP_PARAM_CHUNKS : -if (!net->sctp.auth_enable) +if (!ep->auth_enable) goto fallthrough;/* SCTP-AUTH: Section 3.2
@@ -2170,7 +2172,7 @@ static sctp_ierror_t sctp_verify_param(struct net *net,break ;case SCTP_PARAM_HMAC_ALGO : -if (!net->sctp.auth_enable) +if (!ep->auth_enable) goto fallthrough; hmacs = (struct sctp_hmac_algo_param *)param.p;
@@ -2204,10 +2206,9 @@ fallthrough: }/* Verify the INIT packet before we process it. */ -int sctp_verify_init (struct net *net,const struct sctp_association *asoc, -sctp_cid_t cid, -sctp_init_chunk_t *peer_init, -struct sctp_chunk *chunk, +int sctp_verify_init (struct net *net,const struct sctp_endpoint *ep, +const struct sctp_association *asoc,sctp_cid_t cid, +sctp_init_chunk_t *peer_init,struct sctp_chunk *chunk,struct sctp_chunk **errp) {union sctp_params param;
@@ -2250,8 +2251,8 @@ int sctp_verify_init(struct net *net, const struct sctp_association *asoc,/* Verify all the variable length parameters */ sctp_walk_params(param, peer_init, init_hdr.params) { - - result =sctp_verify_param (net, asoc, param, cid, chunk, errp); + result =sctp_verify_param (net, ep, asoc, param, cid, + chunk, errp);switch (result) {case SCTP_IERROR_ABORT :case SCTP_IERROR_NOMEM :
@@ -2483,6 +2484,7 @@ static int sctp_process_param(struct sctp_association *asoc,struct sctp_af *af;union sctp_addr_param *addr_param;struct sctp_transport *t; +struct sctp_endpoint *ep = asoc->ep;/* We maintain all INIT parameters in network byte order all the * time. This allows us to not worry about whether the parameters
@@ -2623,7 +2625,7 @@ do_addr_param: goto fall_through;case SCTP_PARAM_RANDOM : -if (!net->sctp.auth_enable) +if (!ep->auth_enable) goto fall_through;/* Save peer's random parameter */
@@ -2636,7 +2638,7 @@ do_addr_param:break ;case SCTP_PARAM_HMAC_ALGO : -if (!net->sctp.auth_enable) +if (!ep->auth_enable) goto fall_through;/* Save peer's HMAC list */
@@ -2652,7 +2654,7 @@ do_addr_param:break ;case SCTP_PARAM_CHUNKS : -if (!net->sctp.auth_enable) +if (!ep->auth_enable) goto fall_through; asoc->peer.peer_chunks = kmemdup(param.p,
net/sctp/sm_statefuns.c +3 -3
@@ -364,7 +364,7 @@ sctp_disposition_t sctp_sf_do_5_1B_init(struct net *net,/* Verify the INIT chunk before processing it. */ err_chunk =NULL ; -if (!sctp_verify_init (net, asoc, chunk->chunk_hdr->type, +if (!sctp_verify_init (net, ep, asoc, chunk->chunk_hdr->type, (sctp_init_chunk_t *)chunk->chunk_hdr, chunk, &err_chunk)) {/* This chunk contains fatal error. It is to be discarded.
@@ -531,7 +531,7 @@ sctp_disposition_t sctp_sf_do_5_1C_ack(struct net *net,/* Verify the INIT chunk before processing it. */ err_chunk =NULL ; -if (!sctp_verify_init (net, asoc, chunk->chunk_hdr->type, +if (!sctp_verify_init (net, ep, asoc, chunk->chunk_hdr->type, (sctp_init_chunk_t *)chunk->chunk_hdr, chunk, &err_chunk)) {
@@ -1437,7 +1437,7 @@ static sctp_disposition_t sctp_sf_do_unexpected_init(/* Verify the INIT chunk before processing it. */ err_chunk =NULL ; -if (!sctp_verify_init (net, asoc, chunk->chunk_hdr->type, +if (!sctp_verify_init (net, ep, asoc, chunk->chunk_hdr->type, (sctp_init_chunk_t *)chunk->chunk_hdr, chunk, &err_chunk)) {/* This chunk contains fatal error. It is to be discarded.
net/sctp/socket.c +67 -29
242 lines not on this page · raw message
net/sctp/sysctl.c +36 -2
@@ -65,8 +65,11 @@ extern int sysctl_sctp_wmem[3];static int proc_sctp_do_hmac_alg (ctl_table *ctl,int write,void __user *buffer,size_t *lenp, -loff_t *ppos); +static int proc_sctp_do_auth (struct ctl_table *ctl,int write, +void __user *buffer,size_t *lenp, +loff_t *ppos); +static ctl_table sctp_table[] = { { .procname ="sctp_mem" ,
@@ -267,7 +270,7 @@ static ctl_table sctp_net_table[] = { .data = &init_net.sctp.auth_enable, .maxlen = sizeof(int), .mode = 0644, - .proc_handler = proc_dointvec, + .proc_handler = proc_sctp_do_auth, }, { .procname = "addr_scope_policy",
@@ -348,6 +351,37 @@ static int proc_sctp_do_hmac_alg(ctl_table *ctl,return ret; } +static int proc_sctp_do_auth (struct ctl_table *ctl,int write, +void __user *buffer,size_t *lenp, +loff_t *ppos) +{ +struct net *net = current->nsproxy->net_ns; +struct ctl_table tbl; +int new_value, ret; + +memset (&tbl,0 ,sizeof (struct ctl_table )); + tbl.maxlen =sizeof (unsigned int ); + +if (write) + tbl.data = &new_value; +else + tbl.data = &net->sctp.auth_enable; + + ret =proc_dointvec (&tbl, write, buffer, lenp, ppos); + +if (write) { +struct sock *sk = net->sctp.ctl_sock; + + net->sctp.auth_enable = new_value; +/* Update the value in the control socket */ +lock_sock (sk); +sctp_sk (sk)->ep->auth_enable = new_value; +release_sock (sk); + } + +return ret; +} +int sctp_sysctl_net_register (struct net *net) {struct ctl_table *table;
scripts/mod/modpost.c +6 -2
@@ -573,12 +573,16 @@ static int ignore_undef_symbol(struct elf_info *info, const char *symname)if (strncmp (symname,"_restgpr_" ,sizeof ("_restgpr_" ) -1 ) ==0 ||strncmp (symname,"_savegpr_" ,sizeof ("_savegpr_" ) -1 ) ==0 ||strncmp (symname,"_rest32gpr_" ,sizeof ("_rest32gpr_" ) -1 ) ==0 || -strncmp (symname,"_save32gpr_" ,sizeof ("_save32gpr_" ) -1 ) ==0 ) +strncmp (symname,"_save32gpr_" ,sizeof ("_save32gpr_" ) -1 ) ==0 || +strncmp (symname,"_restvr_" ,sizeof ("_restvr_" ) -1 ) ==0 || +strncmp (symname,"_savevr_" ,sizeof ("_savevr_" ) -1 ) ==0 )return 1 ;if (info->hdr->e_machine ==EM_PPC64 )/* Special register function linked on all modules during final link of .ko */ if (strncmp (symname,"_restgpr0_" ,sizeof ("_restgpr0_" ) -1 ) ==0 || -strncmp (symname,"_savegpr0_" ,sizeof ("_savegpr0_" ) -1 ) ==0 ) +strncmp (symname,"_savegpr0_" ,sizeof ("_savegpr0_" ) -1 ) ==0 || +strncmp (symname,"_restvr_" ,sizeof ("_restvr_" ) -1 ) ==0 || +strncmp (symname,"_savevr_" ,sizeof ("_savevr_" ) -1 ) ==0 )return 1 ;/* Do not ignore this symbol */ return 0 ;