13 Apr, 2014
2 commits
-
Pull yet more networking updates from David Miller:
1) Various fixes to the new Redpine Signals wireless driver, from
Fariya Fatima.2) L2TP PPP connect code takes PMTU from the wrong socket, fix from
Dmitry Petukhov.3) UFO and TSO packets differ in whether they include the protocol
header in gso_size, account for that in skb_gso_transport_seglen().
From Florian Westphal.4) If VLAN untagging fails, we double free the SKB in the bridging
output path. From Toshiaki Makita.5) Several call sites of sk->sk_data_ready() were referencing an SKB
just added to the socket receive queue in order to calculate the
second argument via skb->len. This is dangerous because the moment
the skb is added to the receive queue it can be consumed in another
context and freed up.It turns out also that none of the sk->sk_data_ready()
implementations even care about this second argument.So just kill it off and thus fix all these use-after-free bugs as a
side effect.6) Fix inverted test in tcp_v6_send_response(), from Lorenzo Colitti.
7) pktgen needs to do locking properly for LLTX devices, from Daniel
Borkmann.8) xen-netfront driver initializes TX array entries in RX loop :-) From
Vincenzo Maffione.9) After refactoring, some tunnel drivers allow a tunnel to be
configured on top itself. Fix from Nicolas Dichtel.* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (46 commits)
vti: don't allow to add the same tunnel twice
gre: don't allow to add the same tunnel twice
drivers: net: xen-netfront: fix array initialization bug
pktgen: be friendly to LLTX devices
r8152: check RTL8152_UNPLUG
net: sun4i-emac: add promiscuous support
net/apne: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
net: ipv6: Fix oif in TCP SYN+ACK route lookup.
drivers: net: cpsw: enable interrupts after napi enable and clearing previous interrupts
drivers: net: cpsw: discard all packets received when interface is down
net: Fix use after free by removing length arg from sk_data_ready callbacks.
Drivers: net: hyperv: Address UDP checksum issues
Drivers: net: hyperv: Negotiate suitable ndis version for offload support
Drivers: net: hyperv: Allocate memory for all possible per-pecket information
bridge: Fix double free and memory leak around br_allowed_ingress
bonding: Remove debug_fs files when module init fails
i40evf: program RSS LUT correctly
i40evf: remove open-coded skb_cow_head
ixgb: remove open-coded skb_cow_head
igbvf: remove open-coded skb_cow_head
... -
Pull vfs updates from Al Viro:
"The first vfs pile, with deep apologies for being very late in this
window.Assorted cleanups and fixes, plus a large preparatory part of iov_iter
work. There's a lot more of that, but it'll probably go into the next
merge window - it *does* shape up nicely, removes a lot of
boilerplate, gets rid of locking inconsistencie between aio_write and
splice_write and I hope to get Kent's direct-io rewrite merged into
the same queue, but some of the stuff after this point is having
(mostly trivial) conflicts with the things already merged into
mainline and with some I want more testing.This one passes LTP and xfstests without regressions, in addition to
usual beating. BTW, readahead02 in ltp syscalls testsuite has started
giving failures since "mm/readahead.c: fix readahead failure for
memoryless NUMA nodes and limit readahead pages" - might be a false
positive, might be a real regression..."* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (63 commits)
missing bits of "splice: fix racy pipe->buffers uses"
cifs: fix the race in cifs_writev()
ceph_sync_{,direct_}write: fix an oops on ceph_osdc_new_request() failure
kill generic_file_buffered_write()
ocfs2_file_aio_write(): switch to generic_perform_write()
ceph_aio_write(): switch to generic_perform_write()
xfs_file_buffered_aio_write(): switch to generic_perform_write()
export generic_perform_write(), start getting rid of generic_file_buffer_write()
generic_file_direct_write(): get rid of ppos argument
btrfs_file_aio_write(): get rid of ppos
kill the 5th argument of generic_file_buffered_write()
kill the 4th argument of __generic_file_aio_write()
lustre: don't open-code kernel_recvmsg()
ocfs2: don't open-code kernel_recvmsg()
drbd: don't open-code kernel_recvmsg()
constify blk_rq_map_user_iov() and friends
lustre: switch to kernel_sendmsg()
ocfs2: don't open-code kernel_sendmsg()
take iov_iter stuff to mm/iov_iter.c
process_vm_access: tidy up a bit
...
12 Apr, 2014
1 commit
-
Several spots in the kernel perform a sequence like:
skb_queue_tail(&sk->s_receive_queue, skb);
sk->sk_data_ready(sk, skb->len);But at the moment we place the SKB onto the socket receive queue it
can be consumed and freed up. So this skb->len access is potentially
to freed up memory.Furthermore, the skb->len can be modified by the consumer so it is
possible that the value isn't accurate.And finally, no actual implementation of this callback actually uses
the length argument. And since nobody actually cared about it's
value, lots of call sites pass arbitrary values in such as '0' and
even '1'.So just remove the length argument from the callback, that way there
is no confusion whatsoever and all of these use-after-free cases get
fixed as a side effect.Based upon a patch by Eric Dumazet and his suggestion to audit this
issue tree-wide.Signed-off-by: David S. Miller
05 Apr, 2014
1 commit
-
Pull renameat2 system call from Miklos Szeredi:
"This adds a new syscall, renameat2(), which is the same as renameat()
but with a flags argument.The purpose of extending rename is to add cross-rename, a symmetric
variant of rename, which exchanges the two files. This allows
interesting things, which were not possible before, for example
atomically replacing a directory tree with a symlink, etc... This
also allows overlayfs and friends to operate on whiteouts atomically.Andy Lutomirski also suggested a "noreplace" flag, which disables the
overwriting behavior of rename.These two flags, RENAME_EXCHANGE and RENAME_NOREPLACE are only
implemented for ext4 as an example and for testing"* 'cross-rename' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs:
ext4: add cross rename support
ext4: rename: split out helper functions
ext4: rename: move EMLINK check up
ext4: rename: create ext4_renament structure for local vars
vfs: add cross-rename
vfs: lock_two_nondirectories: allow directory args
security: add flags to rename hooks
vfs: add RENAME_NOREPLACE flag
vfs: add renameat2 syscall
vfs: rename: use common code for dir and non-dir
vfs: rename: move d_move() up
vfs: add d_is_dir()
04 Apr, 2014
1 commit
-
Reclaim will be leaving shadow entries in the page cache radix tree upon
evicting the real page. As those pages are found from the LRU, an
iput() can lead to the inode being freed concurrently. At this point,
reclaim must no longer install shadow pages because the inode freeing
code needs to ensure the page tree is really empty.Add an address_space flag, AS_EXITING, that the inode freeing code sets
under the tree lock before doing the final truncate. Reclaim will check
for this flag before installing shadow pages.Signed-off-by: Johannes Weiner
Reviewed-by: Rik van Riel
Reviewed-by: Minchan Kim
Cc: Andrea Arcangeli
Cc: Bob Liu
Cc: Christoph Hellwig
Cc: Dave Chinner
Cc: Greg Thelen
Cc: Hugh Dickins
Cc: Jan Kara
Cc: KOSAKI Motohiro
Cc: Luigi Semenzato
Cc: Mel Gorman
Cc: Metin Doslu
Cc: Michel Lespinasse
Cc: Ozgun Erdogan
Cc: Peter Zijlstra
Cc: Roman Gushchin
Cc: Ryan Mallon
Cc: Tejun Heo
Cc: Vlastimil Babka
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
02 Apr, 2014
3 commits
-
Signed-off-by: Al Viro
-
(casts are due to misannotations in lustre; it uses iovec where kvec would be
correct type; too much noise to properly annotate right now).Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
01 Apr, 2014
1 commit
-
Add new renameat2 syscall, which is the same as renameat with an added
flags argument.Pass flags to vfs_rename() and to i_op->rename() as well.
Signed-off-by: Miklos Szeredi
Reviewed-by: J. Bruce Fields
20 Mar, 2014
9 commits
-
Cc: Andreas Dilger
Cc: Oleg Drokin
Signed-off-by: Peng Tao
Signed-off-by: Greg Kroah-Hartman -
Cc: Andreas Dilger
Cc: Oleg Drokin
Signed-off-by: Peng Tao
Signed-off-by: Greg Kroah-Hartman -
Cc: Andreas Dilger
Cc: Oleg Drokin
Signed-off-by: Peng Tao
Signed-off-by: Greg Kroah-Hartman -
Cc: Andreas Dilger
Cc: Oleg Drokin
Signed-off-by: Peng Tao
Signed-off-by: Greg Kroah-Hartman -
Cc: Andreas Dilger
Cc: Oleg Drokin
Signed-off-by: Peng Tao
Signed-off-by: Greg Kroah-Hartman -
This patch fixes space required before the open parenthesis in lustre
driver.Signed-off-by: Tugce Sirin
Signed-off-by: Greg Kroah-Hartman -
Fix checkpatch.pl issues with open brace '{' following
struct go on the same line in lib-types.hSigned-off-by: Aybuke Ozdemir
Acked-by: Paul E. McKenney
Signed-off-by: Greg Kroah-Hartman -
Fix checkpatch.pl issues with
unnecessary space after function pointer name in lib-types.hSigned-off-by: Aybuke Ozdemir
Signed-off-by: Greg Kroah-Hartman -
Add an extra line break between the variable
declaration and the rest of the codeSigned-off-by: Georgiana Rodica Chelu
Acked-by: Paul E. McKenney
Signed-off-by: Greg Kroah-Hartman
19 Mar, 2014
2 commits
-
There is no point in combining a variable
that is 0 with other things with |The semantic patch used:
@@
expression x,e,e1;
statement S;
@@if (x == 0) {
}Signed-off-by: Georgiana Rodica Chelu
Signed-off-by: Greg Kroah-Hartman -
Fixed some minor checkpatch warnings such as whitespace.
Coccinelle was used for this patch (NOTE: some of the changes were made by hand). The script is not complete (semantically) and might raise some checkpatch warnings in terms of indentation depending on existing code.
*** IFASSIGNMENT.COCCI START ***
/* Coccinelle script to handle assignments in if statements
* For compound statements, can so far only handle statements with the
* assignment on either extreme *//* This rule is for simple cases
* e.g. just an assignment in if, possibly with unary operator */
@simple@
expression E1, E2;
statement S1, S2;
@@+ E1 = E2;
if (
- (E1 = E2)
+ E1
)
S1 else S2/* This rule is for compound statements where the assignment is on the right.*/
@right@
expression E, E1, E2;
statement S1, S2;
@@(
/* and */
- if (E && (E1 = E2))
+ if (E) {
+ E1 = E2;
+ if (E1)
S1 else S2
+ } else S2
|
- if (E && (E1 = E2))
+ if (E) {
+ E1 = E2;
+ if (E1)
S1
+ }/* or */
|
- if (E || (E1 = E2))
+ if (!E) {
+ E1 = E2;
+ if (E1)
S1 else S2
+ }
+ else S1
|
- if (E || (E1 = E2))
+ if (!E) {
+ E1 = E2;
+ if (E1) S1
+ } else
S1/* not equal */
|
- if (E != (E1 = E2))
+ E1 = E2;
+ if (E != E1)
S1 else S2
|
- if (E != (E1 = E2))
+ E1 = E2;
+ if (E != E1)
S1/* equal */
|
- if (E == (E1 = E2))
+ E1 = E2;
+ if (E == E1)
S1 else S2
|
- if (E == (E1 = E2))
+ E1 = E2;
+ if (E == E1)
S1/* greater than */
|
- if (E > (E1 = E2))
+ E1 = E2;
+ if (E > E1)
S1 else S2
|
- if (E > (E1 = E2))
+ E1 = E2;
+ if (E > E1)
S1/* less than */
|
- if (E < (E1 = E2))
+ E1 = E2;
+ if (E < E1)
S1 else S2
|
- if (E < (E1 = E2))
+ E1 = E2;
+ if (E < E1)
S1/* lesser than or equal to */
|
- if (E = (E1 = E2))
+ E1 = E2;
+ if (E >= E1)
S1 else S2
|
- if (E >= (E1 = E2))
+ E1 = E2;
+ if (E >= E1)
S1
)/* This rule is for compound statements where the assignment is on the left.*/
@left@
expression E, E1, E2;
statement S1, S2;
@@(
/* and */
- if ((E1 = E2) && E)
+ E1 = E2;
+ if (E1 && E)
S1 else S2
|
- if ((E1 = E2) && E)
+ E1 = E2;
+ if (E1 && E)
S1
|/* or */
- if ((E1 = E2) || E)
+ E1 = E2;
+ if (E1 || E)
S1
|
- if ((E1 = E2) || E)
+ E1 = E2;
+ if (E1 || E)
S1 else S2
|/* not equal */
- if ((E1 = E2) != E)
+ E1 = E2;
+ if (E1 != E)
S1
|
- if ((E1 = E2) != E)
+ E1 = E2;
+ if (E1 != E)
S1 else S2
|/* equal */
- if ((E1 = E2) == E)
+ E1 = E2;
+ if (E1 == E)
S1
|
- if ((E1 = E2) == E)
+ E1 = E2;
+ if (E1 == E)
S1 else S2
|
/* greater */
- if ((E1 = E2) > E)
+ E1 = E2;
+ if (E1 > E)
S1
|
- if ((E1 = E2) > E)
+ E1 = E2;
+ if (E1 > E)
S1 else S2
|/* less */
- if ((E1 = E2) < E)
+ E1 = E2;
+ if (E1 < E)
S1
|
- if ((E1 = E2) < E)
+ E1 = E2;
+ if (E1 < E)
S1 else S2/* lesser than or equal to */
- if ((E1 = E2) = E)
+ E1 = E2;
+ if (E1 >= E)
S1
|
- if ((E1 = E2) >= E)
+ E1 = E2;
+ if (E1 >= E)
S1 else S2
)*** IFASSIGNMENT.COCCI END ***
Signed-off-by: Chi Pham
Signed-off-by: Greg Kroah-Hartman
18 Mar, 2014
4 commits
-
unsplit strings from two lines to one. Changes resulted
in line over 80 characters warning. Leaving the latter
of the two warnings for possible string grepping reasons.Signed-off-by: Gary Alan Rookard
Signed-off-by: Greg Kroah-Hartman -
fixed up a spacing issue.
Signed-off-by: Gary Alan Rookard
Signed-off-by: Greg Kroah-Hartman -
unsplit string from two lines to one.
Signed-off-by: Gary Alan Rookard
Signed-off-by: Greg Kroah-Hartman -
unsplit strings from two lines to one.
Signed-off-by: Gary Alan Rookard
Signed-off-by: Greg Kroah-Hartman
17 Mar, 2014
2 commits
-
A function prototype is always a declaration and thus has "extern" prepended by default.
Signed-off-by: Ashley Smith
Acked-by: Paul E. McKenney
Signed-off-by: Peter P Waskiewicz Jr -
This patch fixes the following sparse warning:
drivers/staging/lustre/lustre/lov/lov_request.c:53:28: warning: Using plain integer as NULL pointerSigned-off-by: Himangi Saraogi
Acked-by: Paul E. McKenney
Signed-off-by: Peter P Waskiewicz Jr
14 Mar, 2014
1 commit
-
This patch fixes the following Sparse warnings in console.c :
drivers/staging/lustre/lnet/selftest/console.c:65:1: warning: symbol 'lstcon_node_get' was not declared. Should it be static?
drivers/staging/lustre/lnet/selftest/console.c:118:1: warning: symbol 'lstcon_node_put' was not declared. Should it be static?
drivers/staging/lustre/lnet/selftest/console.c:348:1: warning: symbol 'lstcon_sesrpc_condition' was not declared. Should it be static?
drivers/staging/lustre/lnet/selftest/console.c:377:1: warning: symbol 'lstcon_sesrpc_readent' was not declared. Should it be static?
drivers/staging/lustre/lnet/selftest/console.c:834:1: warning: symbol 'lstcon_batch_find' was not declared. Should it be static?
drivers/staging/lustre/lnet/selftest/console.c:1002:1: warning: symbol 'lstcon_batrpc_condition' was not declared. Should it be static?
drivers/staging/lustre/lnet/selftest/console.c:1145:1: warning: symbol 'lstcon_testrpc_condition' was not declared. Should it be static?
drivers/staging/lustre/lnet/selftest/console.c:1374:1: warning: symbol 'lstcon_test_find' was not declared. Should it be static?
drivers/staging/lustre/lnet/selftest/console.c:1389:1: warning: symbol 'lstcon_tsbrpc_readent' was not declared. Should it be static?
drivers/staging/lustre/lnet/selftest/console.c:1468:1: warning: symbol 'lstcon_statrpc_readent' was not declared. Should it be static?
drivers/staging/lustre/lnet/selftest/console.c:1492:1: warning: symbol 'lstcon_ndlist_stat' was not declared. Should it be static?
drivers/staging/lustre/lnet/selftest/console.c:1581:1: warning: symbol 'lstcon_debug_ndlist' was not declared. Should it be static?Signed-off-by: Himangi Saraogi
Acked-by: Paul E. McKenney
Signed-off-by: Peter P Waskiewicz Jr
09 Mar, 2014
12 commits
-
This patch fix spelling typo in comments within various part
of luster sources.Signed-off-by: Masanari Iida
Signed-off-by: Greg Kroah-Hartman -
Correct spelling typo in lustre/include/lustre
Signed-off-by: Masanari Iida
Signed-off-by: Greg Kroah-Hartman -
This path fix spelling typo in lustre/include.
Signed-off-by: Masanari Iida
Signed-off-by: Greg Kroah-Hartman -
Fix typo in comments within lustre/include.
Signed-off-by: Masanari Iida
Signed-off-by: Greg Kroah-Hartman -
Fix spelling typo in lustre/lustre/llite
Signed-off-by: Masanari Iida
Signed-off-by: Greg Kroah-Hartman -
The C99 specification states in section 6.11.5:
The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.Signed-off-by: Tobias Klauser
Signed-off-by: Greg Kroah-Hartman -
Cc: Andreas Dilger
Cc: Oleg Drokin
Signed-off-by: Peng Tao
Signed-off-by: Greg Kroah-Hartman -
Cc: Andreas Dilger
Cc: Oleg Drokin
Signed-off-by: Peng Tao
Signed-off-by: Greg Kroah-Hartman -
Kernel provides isspace().
Cc: Andreas Dilger
Cc: Oleg Drokin
Signed-off-by: Peng Tao
Signed-off-by: Greg Kroah-Hartman -
cfs_expr_list_print is removed due to no callers. Other internal
functions are held unexported.Cc: Andreas Dilger
Cc: Oleg Drokin
Signed-off-by: Peng Tao
Signed-off-by: Greg Kroah-Hartman -
The only difference against generic strncasecmp() is that
cfs_strncasecmp() check NULL pointers and zero length parameter,
which all callers have already taken care of.Cc: Andreas Dilger
Cc: Oleg Drokin
Signed-off-by: Peng Tao
Signed-off-by: Greg Kroah-Hartman -
They are not called by anyone and cause gcc warning:
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:609: warning: ‘kiblnd_debug_conn’ defined but not used
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:589: warning: ‘kiblnd_debug_rx’ defined but not used
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:597: warning: ‘kiblnd_debug_tx’ defined but not usedCc: Andreas Dilger
Cc: Oleg Drokin
Signed-off-by: Peng Tao
Signed-off-by: Greg Kroah-Hartman
07 Mar, 2014
1 commit
-
This patch fixes the following sparse warning :
drivers/staging/lustre/lustre/lmv/lproc_lmv.c:99:35: warning: incorrect type in argument 2 (different address spaces)
drivers/staging/lustre/lustre/lmv/lproc_lmv.c:99:35: expected void const [noderef] *from
drivers/staging/lustre/lustre/lmv/lproc_lmv.c:99:35: got char const *bufferSigned-off-by: Himangi Saraogi
Signed-off-by: Greg Kroah-Hartman