diff options
author | Kevin Hilman <khilman@linaro.org> | 2015-12-10 08:01:10 -0800 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2015-12-10 08:01:10 -0800 |
commit | 8eec3ec7b6576a80fbeda89beed8f9f667f9dc7b (patch) | |
tree | d6acbc72ce4f7434374ba895f88fcfcdc85fa46a /net/rds | |
parent | 6844488aaa6b23d45106c9c3c3ba2f2ee4a612f9 (diff) | |
parent | cb371265c2f1a0dd0cee03bd7fff413d671c53f0 (diff) |
Merge tag 'v4.1.14' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into linux-linaro-lsk-v4.1
This is the 4.1.14 stable release
# gpg: Signature made Wed Dec 9 11:03:49 2015 PST using RSA key ID 6092693E
# gpg: Good signature from "Greg Kroah-Hartman (Linux kernel stable release signing key) <greg@kroah.com>"
* tag 'v4.1.14' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable: (97 commits)
Linux 4.1.14
netlink: Add missing goto statement to netlink_insert
KVM: s390: enable SIMD only when no VCPUs were created
staging/lustre: use jiffies for lp_last_query times
xhci: Workaround to get Intel xHCI reset working more reliably
tty: Fix tty_send_xchar() lock order inversion
tty: audit: Fix audit source
ALSA: usb-audio: work around CH345 input SysEx corruption
ALSA: usb-audio: prevent CH345 multiport output SysEx corruption
ALSA: usb-audio: add packet size quirk for the Medeli DD305
USB: option: add XS Stick W100-2 from 4G Systems
USB: serial: option: add support for Novatel MiFi USB620L
USB: ti_usb_3410_5052: Add Honeywell HGI80 ID
usb: musb: core: fix order of arguments to ulpi write callback
USB: qcserial: Fix support for HP lt4112 LTE/HSPA+ Gobi 4G Modem
USB: qcserial: Add support for Quectel EC20 Mini PCIe module
usblp: do not set TASK_INTERRUPTIBLE before lock
usb: ehci-orion: fix probe for !GENERIC_PHY
ALSA: usb: Add native DSD support for Aune X1S
usb: chipidea: imx: refine clock operations to adapt for all platforms
...
Diffstat (limited to 'net/rds')
-rw-r--r-- | net/rds/connection.c | 6 | ||||
-rw-r--r-- | net/rds/tcp_recv.c | 11 |
2 files changed, 15 insertions, 2 deletions
diff --git a/net/rds/connection.c b/net/rds/connection.c index da6da57e5f36..9d66705f9d41 100644 --- a/net/rds/connection.c +++ b/net/rds/connection.c @@ -187,6 +187,12 @@ new_conn: } } + if (trans == NULL) { + kmem_cache_free(rds_conn_slab, conn); + conn = ERR_PTR(-ENODEV); + goto out; + } + conn->c_trans = trans; ret = trans->conn_alloc(conn, gfp); diff --git a/net/rds/tcp_recv.c b/net/rds/tcp_recv.c index fbc5ef88bc0e..27a992154804 100644 --- a/net/rds/tcp_recv.c +++ b/net/rds/tcp_recv.c @@ -214,8 +214,15 @@ static int rds_tcp_data_recv(read_descriptor_t *desc, struct sk_buff *skb, } to_copy = min(tc->t_tinc_data_rem, left); - pskb_pull(clone, offset); - pskb_trim(clone, to_copy); + if (!pskb_pull(clone, offset) || + pskb_trim(clone, to_copy)) { + pr_warn("rds_tcp_data_recv: pull/trim failed " + "left %zu data_rem %zu skb_len %d\n", + left, tc->t_tinc_data_rem, skb->len); + kfree_skb(clone); + desc->error = -ENOMEM; + goto out; + } skb_queue_tail(&tinc->ti_skb_list, clone); rdsdebug("skb %p data %p len %d off %u to_copy %zu -> " |