11 Jun, 2017
1 commit
-
The kernel may sleep under a rcu read lock in cfpkt_create_pfx, and the
function call path is:
cfcnfg_linkup_rsp (acquire the lock by rcu_read_lock)
cfctrl_linkdown_req
cfpkt_create
cfpkt_create_pfx
alloc_skb(GFP_KERNEL) --> may sleep
cfserl_receive (acquire the lock by rcu_read_lock)
cfpkt_split
cfpkt_create_pfx
alloc_skb(GFP_KERNEL) --> may sleepThere is "in_interrupt" in cfpkt_create_pfx to decide use "GFP_KERNEL" or
"GFP_ATOMIC". In this situation, "GFP_KERNEL" is used because the function
is called under a rcu read lock, instead in interrupt.To fix it, only "GFP_ATOMIC" is used in cfpkt_create_pfx.
Signed-off-by: Jia-Ju Bai
Signed-off-by: David S. Miller
15 Mar, 2016
1 commit
-
gcc points out code that is not indented the way it is
interpreted:net/caif/cfpkt_skbuff.c: In function 'cfpkt_setlen':
net/caif/cfpkt_skbuff.c:289:4: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]
return cfpkt_getlen(pkt);
^~~~~~
net/caif/cfpkt_skbuff.c:286:3: note: ...this 'else' clause, but it is not
else
^~~~It is clear from the context that not returning here would be
a bug, as we'd end up passing a negative length into a function
that takes a u16 length, so it is not missing curly braces
here, and I'm assuming that the indentation is the only part
that's wrong about it.Signed-off-by: Arnd Bergmann
Signed-off-by: David S. Miller
21 Feb, 2015
1 commit
-
The cfpkt_iterate() function can return -EPROTO on error, but the
function is a u16 so the negative value gets truncated to a positive
unsigned short. This causes a static checker warning.The only caller which might care is cffrml_receive(), when it's checking
the frame checksum. I modified cffrml_receive() so that it never says
-EPROTO is a valid checksum.Also this isn't ever going to be inlined so I removed the "inline".
Signed-off-by: Dan Carpenter
Signed-off-by: David S. Miller
08 Nov, 2013
1 commit
-
Also remove the warning for fragmented packets -- skb_cow_data() will
linearize the buffer, removing all fragments.Signed-off-by: Mathias Krause
Cc: Dmitry Tarnyagin
Cc: "David S. Miller"
Signed-off-by: David S. Miller
24 Apr, 2013
1 commit
-
Remove my soon bouncing email address.
Also remove the "Contact:" line in file header.
The MAINTAINERS file is a better place to find the
contact person anyway.Signed-off-by: Sjur Brændeland
Signed-off-by: David S. Miller
08 Mar, 2013
1 commit
-
This lines up function arguments on second and subsequent lines at the
first column after the openning parenthesis of the first line.Signed-off-by: Silviu-Mihai Popescu
Signed-off-by: David S. Miller
13 Apr, 2012
1 commit
-
Set traffic class for CAIF packets, based on socket
priority, CAIF protocol type, or type of message.Traffic class mapping for different packet types:
- control: TC_PRIO_CONTROL;
- flow control: TC_PRIO_CONTROL;
- at: TC_PRIO_CONTROL;
- rfm: TC_PRIO_INTERACTIVE_BULK;
- other sockets: equals to socket's TC;
- network data: no change.Signed-off-by: Dmitry Tarnyagin
Signed-off-by: David S. Miller
06 Dec, 2011
1 commit
-
NCM 1.0 does not support anything but Ethernet framing, hence
CAIF payload will be put into Ethernet frames.Discovery is based on fixed USB vendor 0x04cc (ST-Ericsson),
product-id 0x230f (NCM). In this variant only CAIF payload is sent over
the NCM interface.The CAIF stack (cfusbl.c) will when USB interface register first check if
we got a CDC NCM USB interface with the right VID, PID.
It will then read the device's Ethernet address and create a 'template'
Ethernet TX header, using a broadcast address as the destination address,
and EthType 0x88b5 (802.1 Local Experimental - vendor specific).A protocol handler for 0x88b5 is setup for reception of CAIF frames from
the CDC NCM USB interface.Signed-off-by: Sjur Brændeland
Signed-off-by: David S. Miller
01 Dec, 2011
1 commit
-
Allow NULL pointer in cfpkt_extr_head in order to
skip past header data.Signed-off-by: Sjur Brændeland
Signed-off-by: David S. Miller
01 Nov, 2011
1 commit
-
These files are non modular, but need to export symbols using
the macros now living in export.h -- call out the include so
that things won't break when we remove the implicit presence
of module.h from everywhere.Signed-off-by: Paul Gortmaker
16 May, 2011
1 commit
-
Signed-off-by: Sjur Brændeland
Signed-off-by: David S. Miller
12 Apr, 2011
1 commit
-
Cleanup of new CAIF code.
* make local functions static
* remove code that is never used
* expand get_caif_conf() since wrapper is no longer needed
* make args to comparison functions const
* rename connect_req_to_link_param to keep exported names
consistentCompile tested only.
Signed-off-by: Stephen Hemminger
Acked-by: Sjur Brændeland
Signed-off-by: David S. Miller
07 Sep, 2010
1 commit
-
This patch standardizes caif message logging prefixes.
Add #define pr_fmt(fmt) KBUILD_MODNAME ":%s(): " fmt, __func__
Add missing "\n"s to some logging messages
Convert pr_warning to pr_warnThis changes the logging message prefix from CAIF: to caif:
for all uses but caif_socket.c and chnl_net.c. Those now use
their filename without extension.Signed-off-by: Joe Perches
Signed-off-by: David S. Miller
11 Aug, 2010
1 commit
-
Headroom size for control channel must be at least 48 bytes in some scenarios.
Signed-off-by: Sjur Braendeland
Signed-off-by: David S. Miller
21 Jun, 2010
2 commits
-
Previously CAIF supported maximum transfer size of ~4050.
The transfer size is now calculated dynamically based on the
link layers mtu size.Signed-off-by: Sjur Braendeland@stericsson.com
Signed-off-by: David S. Miller -
CAIF Remote File Manager may send or receive more than 4050 bytes.
Due to this The CAIF RFM service have to support segmentation.Signed-off-by: Sjur Braendeland@stericsson.com
Signed-off-by: David S. Miller
24 May, 2010
1 commit
-
Discovered bugs when injecting slab allocation failures.
Add checks on all memory allocation.Signed-off-by: Sjur Braendeland
Signed-off-by: David S. Miller
31 Mar, 2010
1 commit
-
Support functions for the caif protocol stack:
cfcnfg.c - CAIF Configuration Module used for
adding and removing drivers and connection
cfpkt_skbuff.c - CAIF Packet layer (SKB helper functions)Signed-off-by: Sjur Braendeland
Signed-off-by: David S. Miller