From: Chris Wright Date: Thu, 23 Apr 2009 06:41:51 +0000 (-0700) Subject: 2.6.29: add netrom fix X-Git-Tag: v2.6.29.2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2f87957d1eaba126d27066479f25889a4191ebe8;p=thirdparty%2Fkernel%2Fstable-queue.git 2.6.29: add netrom fix --- diff --git a/queue-2.6.29/net-netrom-fix-socket-locking.patch b/queue-2.6.29/net-netrom-fix-socket-locking.patch new file mode 100644 index 00000000000..146431b88a3 --- /dev/null +++ b/queue-2.6.29/net-netrom-fix-socket-locking.patch @@ -0,0 +1,36 @@ +From cc29c70dd581f85ee7a3e7980fb031f90b90a2ab Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Wed, 22 Apr 2009 00:49:51 -0700 +Subject: net/netrom: Fix socket locking + +upstream commit: cc29c70dd581f85ee7a3e7980fb031f90b90a2ab + +Patch "af_rose/x25: Sanity check the maximum user frame size" +(commit 83e0bbcbe2145f160fbaa109b0439dae7f4a38a9) from Alan Cox got +locking wrong. If we bail out due to user frame size being too large, +we must unlock the socket beforehand. + +Signed-off-by: Jean Delvare +Signed-off-by: David S. Miller +Signed-off-by: Chris Wright +--- +in net-2.6 on way to Linus + + net/netrom/af_netrom.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/net/netrom/af_netrom.c ++++ b/net/netrom/af_netrom.c +@@ -1084,8 +1084,10 @@ static int nr_sendmsg(struct kiocb *iocb + + /* Build a packet - the conventional user limit is 236 bytes. We can + do ludicrously large NetROM frames but must not overflow */ +- if (len > 65536) +- return -EMSGSIZE; ++ if (len > 65536) { ++ err = -EMSGSIZE; ++ goto out; ++ } + + SOCK_DEBUG(sk, "NET/ROM: sendto: building packet.\n"); + size = len + NR_NETWORK_LEN + NR_TRANSPORT_LEN; diff --git a/queue-2.6.29/series b/queue-2.6.29/series index 25dee0d7142..abea24811ea 100644 --- a/queue-2.6.29/series +++ b/queue-2.6.29/series @@ -42,6 +42,7 @@ dm-target-use-module-refcount-directly.patch dm-path-selector-use-module-refcount-directly.patch dm-table-fix-upgrade-mode-race.patch af_rose-x25-sanity-check-the-maximum-user-frame-size.patch +net-netrom-fix-socket-locking.patch crypto-shash-fix-unaligned-calculation-with-short-length.patch acer-wmi-blacklist-acer-aspire-one.patch kprobes-fix-locking-imbalance-in-kretprobes.patch