Linux 3.18.107
Greg KH
maintainerI'm announcing the release of the 3.18.107 kernel.
All users of the 3.18 kernel series must upgrade.
The updated 3.18.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.18.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/x86/kernel/tsc.c | 2 drivers/cdrom/cdrom.c | 2 drivers/message/fusion/mptsas.c | 1 drivers/net/bonding/bond_main.c | 3 - drivers/net/ppp/pppoe.c | 4 + drivers/net/team/team.c | 38 ++++++++++++++--- fs/cifs/dir.c | 9 ++-- fs/ext4/balloc.c | 3 - fs/ext4/ialloc.c | 43 +------------------ fs/ext4/inline.c | 66 +++++++++++++----------------- fs/ext4/inode.c | 2 fs/ext4/xattr.c | 30 +++++-------- fs/ext4/xattr.h | 32 ++++++++++++++ fs/jbd2/journal.c | 2 include/net/llc_conn.h | 1 kernel/events/core.c | 4 - mm/filemap.c | 4 - net/dns_resolver/dns_key.c | 13 ++--- net/ipv4/tcp.c | 6 +- net/ipv4/tcp_input.c | 7 --- net/ipv6/route.c | 2 net/l2tp/l2tp_ppp.c | 7 +++ net/llc/af_llc.c | 14 +++++- net/llc/llc_c_ac.c | 9 ---- net/llc/llc_conn.c | 22 +++++++++- net/packet/af_packet.c | 88 ++++++++++++++++++++++++++++------------ net/packet/internal.h | 10 ++-- 28 files changed, 253 insertions(+), 173 deletions(-)
Cong Wang (3):
llc: hold llc_sap before release_sock()
llc: fix NULL pointer deref for SOCK_ZAPPED
llc: delete timers synchronously in llc_sk_free()
Dan Carpenter (1):
cdrom: information leak in cdrom_ioctl_media_changed()
Eric Biggers (1):
KEYS: DNS: limit the length of option strings
Eric Dumazet (3):
tcp: md5: reject TCP_MD5SIG or TCP_MD5SIG_EXT on established sockets
net: af_packet: fix race in PACKET_{R|T}X_RING
ipv6: add RTA_TABLE and RTA_PREFSRC to rtm_ipv6_policy
Greg Kroah-Hartman (1):
Linux 3.18.107
Guillaume Nault (2):
l2tp: check sockaddr length in pppol2tp_connect()
pppoe: check sockaddr length in pppoe_connect()
Jann Horn (1):
tcp: don't read out-of-bounds opsize
Jiri Olsa (1):
perf: Return proper values for user stack errors
Martin K. Petersen (1):
scsi: mptsas: Disable WRITE SAME
Matthew Wilcox (1):
mm/filemap.c: fix NULL pointer in page_cache_tree_insert()
Paolo Abeni (1):
team: avoid adding twice the same option to the event list
Sahitya Tummala (1):
jbd2: fix use after free in kjournald2()
Steve French (1):
cifs: do not allow creating sockets except with SMB1 posix exensions
Theodore Ts'o (2):
ext4: fix deadlock between inline_data and ext4_expand_extra_isize_ea()
ext4: don't update checksum of new initialized bitmaps
Willem de Bruijn (1):
packet: fix bitfield update race
Xiaoming Gao (1):
x86/tsc: Prevent 32bit truncation in calc_hpet_ref()
Xin Long (2):
bonding: do not set slave_dev npinfo before slave_enable_netpoll in bond_enslave
team: fix netconsole setup over team
wangguang (1):
ext4: bugfix for mmaped pages in mpage_release_unused_pages()
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 18 -SUBLEVEL = 106 +SUBLEVEL = 107 EXTRAVERSION = NAME = Diseased Newt
arch/x86/kernel/tsc.c +1 -1
@@ -399,7 +399,7 @@ static unsigned long calc_hpet_ref(u64 deltatsc, u64 hpet1, u64 hpet2) hpet2 -= hpet1; tmp = ((u64 )hpet2 *hpet_readl (HPET_PERIOD ));do_div (tmp,1000000 ); -do_div (deltatsc, tmp); + deltatsc =div64_u64 (deltatsc, tmp);return (unsigned long ) deltatsc; }
drivers/cdrom/cdrom.c +1 -1
@@ -2357,7 +2357,7 @@ static int cdrom_ioctl_media_changed(struct cdrom_device_info *cdi,if (!CDROM_CAN (CDC_SELECT_DISC ) || arg ==CDSL_CURRENT )return media_changed (cdi,1 ); -if ((unsigned int )arg >= cdi->capacity) +if (arg >= cdi->capacity)return -EINVAL ; info =kmalloc (sizeof (*info),GFP_KERNEL );
drivers/message/fusion/mptsas.c +1 -0
@@ -1994,6 +1994,7 @@ static struct scsi_host_template mptsas_driver_template = { .cmd_per_lun = 7, .use_clustering = ENABLE_CLUSTERING, .shost_attrs = mptscsih_host_attrs, + .no_write_same = 1, };static int mptsas_get_linkerrors (struct sas_phy *phy)
drivers/net/bonding/bond_main.c +1 -2
@@ -1505,8 +1505,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) }/* switch(bond_mode) */ #ifdef CONFIG_NET_POLL_CONTROLLER - slave_dev->npinfo = bond->dev->npinfo; -if (slave_dev->npinfo) { +if (bond->dev->npinfo) {if (slave_enable_netpoll (new_slave)) {netdev_info (bond_dev,"master_dev is using netpoll, but new slave device does not support netpoll\n" ); res = -EBUSY ;
drivers/net/ppp/pppoe.c +4 -0
@@ -613,6 +613,10 @@ static int pppoe_connect(struct socket *sock, struct sockaddr *uservaddr,lock_sock (sk); error = -EINVAL ; + +if (sockaddr_len !=sizeof (struct sockaddr_pppox )) + goto end; +if (sp->sa_protocol !=PX_PROTO_OE ) goto end;
drivers/net/team/team.c +31 -7
@@ -253,6 +253,17 @@ static void __team_option_inst_mark_removed_port(struct team *team, } } +static bool __team_option_inst_tmp_find (const struct list_head *opts, +const struct team_option_inst *needle) +{ +struct team_option_inst *opt_inst; + +list_for_each_entry (opt_inst, opts, tmp_list) +if (opt_inst == needle) +return true; +return false; +} +static int __team_options_register (struct team *team,const struct team_option *option,size_t option_count)
@@ -1040,14 +1051,11 @@ static void team_port_leave(struct team *team, struct team_port *port) }#ifdef CONFIG_NET_POLL_CONTROLLER -static int team_port_enable_netpoll (struct team *team,struct team_port *port) +static int __team_port_enable_netpoll (struct team_port *port) {struct netpoll *np;int err; -if (!team->dev->npinfo) -return 0 ; - np =kzalloc (sizeof (*np),GFP_KERNEL );if (!np)return -ENOMEM ;
@@ -1061,6 +1069,14 @@ static int team_port_enable_netpoll(struct team *team, struct team_port *port)return err; } +static int team_port_enable_netpoll (struct team_port *port) +{ +if (!port->team->dev->npinfo) +return 0 ; + +return __team_port_enable_netpoll (port); +} +static void team_port_disable_netpoll (struct team_port *port) {struct netpoll *np = port->np;
@@ -1075,7 +1091,7 @@ static void team_port_disable_netpoll(struct team_port *port) kfree(np); }#else -static int team_port_enable_netpoll (struct team *team,struct team_port *port) +static int team_port_enable_netpoll (struct team_port *port) {return 0 ; }
@@ -1182,7 +1198,7 @@ static int team_port_add(struct team *team, struct net_device *port_dev) goto err_vids_add; } - err =team_port_enable_netpoll (team, port); + err =team_port_enable_netpoll (port);if (err) {netdev_err (dev,"Failed to enable netpoll on device %s\n" , portname);
@@ -1887,7 +1903,7 @@ static int team_netpoll_setup(struct net_device *dev,mutex_lock (&team->lock);list_for_each_entry (port, &team->port_list, list) { - err =team_port_enable_netpoll (team, port); + err =__team_port_enable_netpoll (port);if (err) {__team_netpoll_cleanup (team);break ;
@@ -2532,6 +2548,14 @@ static int team_nl_cmd_options_set(struct sk_buff *skb, struct genl_info *info)if (err) goto team_put; opt_inst->changed = true; + +/* dumb/evil user-space can send us duplicate opt, +* keep only the last one +*/ +if (__team_option_inst_tmp_find (&opt_inst_list, + opt_inst)) +continue ; +list_add (&opt_inst->tmp_list, &opt_inst_list); }if (!opt_found) {
fs/cifs/dir.c +5 -4
@@ -674,6 +674,9 @@ int cifs_mknod(struct inode *inode, struct dentry *direntry, umode_t mode, goto mknod_out; } +if (!S_ISCHR (mode) && !S_ISBLK (mode)) + goto mknod_out; +if (!(cifs_sb->mnt_cifs_flags &CIFS_MOUNT_UNX_EMUL )) goto mknod_out;
@@ -682,10 +685,8 @@ int cifs_mknod(struct inode *inode, struct dentry *direntry, umode_t mode, buf =kmalloc (sizeof (FILE_ALL_INFO ),GFP_KERNEL );if (buf ==NULL ) { -kfree (full_path); rc = -ENOMEM ; -free_xid (xid); -return rc; + goto mknod_out; }if (backup_cred (cifs_sb))
@@ -732,7 +733,7 @@ int cifs_mknod(struct inode *inode, struct dentry *direntry, umode_t mode, pdev->minor =cpu_to_le64 (MINOR (device_number)); rc = tcon->ses->server->ops->sync_write (xid, &fid, &io_parms, &bytes_written, iov,1 ); - }/* else if (S_ISFIFO) */ + } tcon->ses->server->ops->close (xid, tcon, &fid);d_drop (direntry);
fs/ext4/balloc.c +1 -2
@@ -243,8 +243,6 @@ static int ext4_init_block_bitmap(struct super_block *sb,*/ ext4_mark_bitmap_end (num_clusters_in_group (sb, block_group), sb->s_blocksize *8 , bh->b_data); -ext4_block_bitmap_csum_set (sb, block_group, gdp, bh); -ext4_group_desc_csum_set (sb, block_group, gdp);return 0 ; }
@@ -446,6 +444,7 @@ ext4_read_block_bitmap_nowait(struct super_block *sb, ext4_group_t block_group) err =ext4_init_block_bitmap (sb, bh, block_group, desc);set_bitmap_uptodate (bh);set_buffer_uptodate (bh); +set_buffer_verified (bh);ext4_unlock_group (sb, block_group);unlock_buffer (bh);if (err)
fs/ext4/ialloc.c +3 -40
55 lines not on this page · raw message
fs/ext4/inline.c +30 -36
215 lines not on this page · raw message
fs/ext4/inode.c +2 -0
@@ -1338,6 +1338,8 @@ static void mpage_release_unused_pages(struct mpage_da_data *mpd,BUG_ON (!PageLocked (page));BUG_ON (PageWriteback (page));if (invalidate) { +if (page_mapped (page)) +clear_page_dirty_for_io (page);block_invalidatepage (page,0 ,PAGE_CACHE_SIZE );ClearPageUptodate (page); }
fs/ext4/xattr.c +12 -18
@@ -1120,16 +1120,14 @@ ext4_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index,struct ext4_xattr_block_find bs = { .s = { .not_found = -ENODATA , }, }; -unsigned long no_expand; +int no_expand;int error;if (!name)return -EINVAL ;if (strlen (name) >255 )return -ERANGE ; -down_write (&EXT4_I (inode)->xattr_sem); - no_expand =ext4_test_inode_state (inode,EXT4_STATE_NO_EXPAND ); -ext4_set_inode_state (inode,EXT4_STATE_NO_EXPAND ); +ext4_write_lock_xattr (inode, &no_expand); error =ext4_reserve_inode_write (handle, inode, &is.iloc);if (error)
@@ -1190,7 +1188,7 @@ ext4_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index,ext4_xattr_update_super_block (handle, inode->i_sb); inode->i_ctime =ext4_current_time (inode);if (!value) -ext4_clear_inode_state (inode,EXT4_STATE_NO_EXPAND ); + no_expand =0 ; error =ext4_mark_iloc_dirty (handle, inode, &is.iloc);/* * The bh is consumed by ext4_mark_iloc_dirty, even with
@@ -1204,9 +1202,7 @@ ext4_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index, cleanup:brelse (is.iloc.bh);brelse (bs.bh); -if (no_expand ==0 ) -ext4_clear_inode_state (inode,EXT4_STATE_NO_EXPAND ); -up_write (&EXT4_I (inode)->xattr_sem); +ext4_write_unlock_xattr (inode, &no_expand);return error; }
@@ -1289,12 +1285,11 @@ int ext4_expand_extra_isize_ea(struct inode *inode, int new_extra_isize,void *base, *start, *end;int extra_isize =0 , error =0 , tried_min_extra_isize =0 ;int s_min_extra_isize =le16_to_cpu (EXT4_SB (inode->i_sb)->s_es->s_min_extra_isize); +int no_expand; + +if (ext4_write_trylock_xattr (inode, &no_expand) ==0 ) +return 0 ; -down_write (&EXT4_I (inode)->xattr_sem); -/* -* Set EXT4_STATE_NO_EXPAND to avoid recursion when marking inode dirty -*/ -ext4_set_inode_state (inode,EXT4_STATE_NO_EXPAND ); retry:if (EXT4_I (inode)->i_extra_isize >= new_extra_isize) goto out;
@@ -1487,8 +1482,7 @@ retry: }brelse (bh); out: -ext4_clear_inode_state (inode,EXT4_STATE_NO_EXPAND ); -up_write (&EXT4_I (inode)->xattr_sem); +ext4_write_unlock_xattr (inode, &no_expand);return 0 ; cleanup:
@@ -1500,10 +1494,10 @@ cleanup:kfree (bs);brelse (bh);/* -* We deliberately leave EXT4_STATE_NO_EXPAND set here since inode -* size expansion failed. +* Inode size expansion failed; don't try again */ -up_write (&EXT4_I (inode)->xattr_sem); + no_expand =1 ; +ext4_write_unlock_xattr (inode, &no_expand);return error; }
fs/ext4/xattr.h +32 -0
@@ -98,6 +98,38 @@ extern const struct xattr_handler ext4_xattr_user_handler;extern const struct xattr_handler ext4_xattr_trusted_handler;extern const struct xattr_handler ext4_xattr_security_handler; +/* +* The EXT4_STATE_NO_EXPAND is overloaded and used for two purposes. +* The first is to signal that there the inline xattrs and data are +* taking up so much space that we might as well not keep trying to +* expand it. The second is that xattr_sem is taken for writing, so +* we shouldn't try to recurse into the inode expansion. For this +* second case, we need to make sure that we take save and restore the +* NO_EXPAND state flag appropriately. +*/ +static inline void ext4_write_lock_xattr (struct inode *inode,int *save) +{ +down_write (&EXT4_I (inode)->xattr_sem); + *save =ext4_test_inode_state (inode,EXT4_STATE_NO_EXPAND ); +ext4_set_inode_state (inode,EXT4_STATE_NO_EXPAND ); +} + +static inline int ext4_write_trylock_xattr (struct inode *inode,int *save) +{ +if (down_write_trylock (&EXT4_I (inode)->xattr_sem) ==0 ) +return 0 ; + *save =ext4_test_inode_state (inode,EXT4_STATE_NO_EXPAND ); +ext4_set_inode_state (inode,EXT4_STATE_NO_EXPAND ); +return 1 ; +} + +static inline void ext4_write_unlock_xattr (struct inode *inode,int *save) +{ +if (*save ==0 ) +ext4_clear_inode_state (inode,EXT4_STATE_NO_EXPAND ); +up_write (&EXT4_I (inode)->xattr_sem); +} +extern ssize_t ext4_listxattr (struct dentry *,char *,size_t );extern int ext4_xattr_get (struct inode *,int ,const char *,void *,size_t );
fs/jbd2/journal.c +1 -1
@@ -275,11 +275,11 @@ loop: goto loop; end_loop: -write_unlock (&journal->j_state_lock);del_timer_sync (&journal->j_commit_timer); journal->j_task =NULL ;wake_up (&journal->j_wait_done_commit);jbd_debug (1 ,"Journal thread exiting.\n" ); +write_unlock (&journal->j_state_lock);return 0 ; }
include/net/llc_conn.h +1 -0
@@ -97,6 +97,7 @@ static __inline__ char llc_backlog_type(struct sk_buff *skb)struct sock *llc_sk_alloc (struct net *net,int family,gfp_t priority,struct proto *prot); +void llc_sk_stop_all_timers (struct sock *sk,bool sync);void llc_sk_free (struct sock *sk);void llc_sk_reset (struct sock *sk);
kernel/events/core.c +2 -2
@@ -7348,9 +7348,9 @@ static int perf_copy_attr(struct perf_event_attr __user *uattr,* __u16 sample size limit. */ if (attr->sample_stack_user >=USHRT_MAX ) - ret = -EINVAL ; +return -EINVAL ;else if (!IS_ALIGNED (attr->sample_stack_user,sizeof (u64))) - ret = -EINVAL ; +return -EINVAL ; } out:
mm/filemap.c +2 -2
@@ -468,7 +468,7 @@ int replace_page_cache_page(struct page *old, struct page *new, gfp_t gfp_mask)VM_BUG_ON_PAGE (!PageLocked (new), new);VM_BUG_ON_PAGE (new->mapping, new); - error =radix_tree_preload (gfp_mask & ~__GFP_HIGHMEM); + error =radix_tree_preload (gfp_mask &GFP_RECLAIM_MASK );if (!error) {struct address_space *mapping = old->mapping;void (*freepage)(struct page *);
@@ -561,7 +561,7 @@ static int __add_to_page_cache_locked(struct page *page,return error; } - error =radix_tree_maybe_preload (gfp_mask & ~__GFP_HIGHMEM); + error =radix_tree_maybe_preload (gfp_mask &GFP_RECLAIM_MASK );if (error) {if (!huge)mem_cgroup_cancel_charge (page, memcg);
net/dns_resolver/dns_key.c +6 -7
@@ -25,6 +25,7 @@#include <linux/moduleparam.h> #include <linux/slab.h> #include <linux/string.h> +#include <linux/ratelimit.h> #include <linux/kernel.h> #include <linux/keyctl.h> #include <linux/err.h>
@@ -91,9 +92,9 @@ dns_resolver_preparse(struct key_preparsed_payload *prep) next_opt =memchr (opt,'#' , end - opt) ?: end; opt_len = next_opt - opt; -if (!opt_len) { -printk (KERN_WARNING -"Empty option to dns_resolver key\n" ); +if (opt_len <=0 || opt_len >128 ) { +pr_warn_ratelimited ("Invalid option length (%d) for dns_resolver key\n" , + opt_len);return -EINVAL ; }
@@ -127,10 +128,8 @@ dns_resolver_preparse(struct key_preparsed_payload *prep) } bad_option_value: -printk (KERN_WARNING -"Option '%*.*s' to dns_resolver key:" -" bad/missing value\n" , - opt_nlen, opt_nlen, opt); +pr_warn_ratelimited ("Option '%*.*s' to dns_resolver key: bad/missing value\n" , + opt_nlen, opt_nlen, opt);return -EINVAL ; }while (opt = next_opt +1 , opt < end); }
net/ipv4/tcp.c +4 -2
@@ -2593,8 +2593,10 @@ static int do_tcp_setsockopt(struct sock *sk, int level,#ifdef CONFIG_TCP_MD5SIG case TCP_MD5SIG : -/* Read the IP->Key mappings from userspace */ - err = tp->af_specific->md5_parse (sk, optval, optlen); +if ((1 << sk->sk_state) & (TCPF_CLOSE |TCPF_LISTEN )) + err = tp->af_specific->md5_parse (sk, optval, optlen); +else + err = -EINVAL ;break ;#endif case TCP_USER_TIMEOUT :
net/ipv4/tcp_input.c +2 -5
@@ -3731,11 +3731,8 @@ const u8 *tcp_parse_md5sig_option(const struct tcphdr *th)int length = (th->doff <<2 ) -sizeof (*th);const u8 *ptr = (const u8 *)(th +1 ); -/* If the TCP option is too short, we can short cut */ -if (length <TCPOLEN_MD5SIG ) -return NULL ; - -while (length >0 ) { +/* If not enough data remaining, we can short cut */ +while (length >=TCPOLEN_MD5SIG ) {int opcode = *ptr++;int opsize;
net/ipv6/route.c +2 -0
@@ -2333,11 +2333,13 @@ void rt6_mtu_change(struct net_device *dev, unsigned int mtu)static const struct nla_policy rtm_ipv6_policy[RTA_MAX +1 ] = { [RTA_GATEWAY ] = { .len =sizeof (struct in6_addr ) }, + [RTA_PREFSRC ] = { .len =sizeof (struct in6_addr ) }, [RTA_OIF ] = { .type =NLA_U32 }, [RTA_IIF ] = { .type =NLA_U32 }, [RTA_PRIORITY ] = { .type =NLA_U32 }, [RTA_METRICS ] = { .type =NLA_NESTED }, [RTA_MULTIPATH ] = { .len =sizeof (struct rtnexthop ) }, + [RTA_TABLE ] = { .type =NLA_U32 }, }; static int rtm_to_fib6_config(struct sk_buff *skb, struct nlmsghdr *nlh,
net/l2tp/l2tp_ppp.c +7 -0
@@ -608,6 +608,13 @@ static int pppol2tp_connect(struct socket *sock, struct sockaddr *uservaddr,lock_sock (sk); error = -EINVAL ; + +if (sockaddr_len !=sizeof (struct sockaddr_pppol2tp ) && + sockaddr_len !=sizeof (struct sockaddr_pppol2tpv3 ) && + sockaddr_len !=sizeof (struct sockaddr_pppol2tpin6 ) && + sockaddr_len !=sizeof (struct sockaddr_pppol2tpv3in6 )) + goto end; +if (sp->sa_protocol !=PX_PROTO_OL2TP ) goto end;
net/llc/af_llc.c +12 -2
@@ -197,9 +197,19 @@ static int llc_ui_release(struct socket *sock) llc->laddr.lsap, llc->daddr.lsap);if (!llc_send_disc (sk))llc_ui_wait_for_disc (sk, sk->sk_rcvtimeo); -if (!sock_flag (sk,SOCK_ZAPPED )) +if (!sock_flag (sk,SOCK_ZAPPED )) { +struct llc_sap *sap = llc->sap; + +/* Hold this for release_sock(), so that llc_backlog_rcv() +* could still use it. +*/ +llc_sap_hold (sap);llc_sap_remove_socket (llc->sap, sk); -release_sock (sk); +release_sock (sk); +llc_sap_put (sap); + }else { +release_sock (sk); + }if (llc->dev)dev_put (llc->dev);sock_put (sk);
net/llc/llc_c_ac.c +1 -8
@@ -1096,14 +1096,7 @@ int llc_conn_ac_inc_tx_win_size(struct sock *sk, struct sk_buff *skb)int llc_conn_ac_stop_all_timers (struct sock *sk,struct sk_buff *skb) { -struct llc_sock *llc =llc_sk (sk); - -del_timer (&llc->pf_cycle_timer.timer); -del_timer (&llc->ack_timer.timer); -del_timer (&llc->rej_sent_timer.timer); -del_timer (&llc->busy_state_timer.timer); - llc->ack_must_be_send =0 ; - llc->ack_pf =0 ; +llc_sk_stop_all_timers (sk, false);return 0 ; }
net/llc/llc_conn.c +21 -1
@@ -951,6 +951,26 @@ out:return sk; } +void llc_sk_stop_all_timers (struct sock *sk,bool sync) +{ +struct llc_sock *llc =llc_sk (sk); + +if (sync) { +del_timer_sync (&llc->pf_cycle_timer.timer); +del_timer_sync (&llc->ack_timer.timer); +del_timer_sync (&llc->rej_sent_timer.timer); +del_timer_sync (&llc->busy_state_timer.timer); + }else { +del_timer (&llc->pf_cycle_timer.timer); +del_timer (&llc->ack_timer.timer); +del_timer (&llc->rej_sent_timer.timer); +del_timer (&llc->busy_state_timer.timer); + } + + llc->ack_must_be_send =0 ; + llc->ack_pf =0 ; +} +/** * llc_sk_free - Frees a LLC socket * @sk - socket to free
@@ -963,7 +983,7 @@ void llc_sk_free(struct sock *sk) llc->state =LLC_CONN_OUT_OF_SVC ;/* Stop all (possibly) running timers */ -llc_conn_ac_stop_all_timers (sk,NULL ); +llc_sk_stop_all_timers (sk, true);#ifdef DEBUG_LLC_CONN_ALLOC printk(KERN_INFO "%s: unackq=%d, txq=%d\n", __func__, skb_queue_len(&llc->pdu_unack_q),
net/packet/af_packet.c +62 -26
192 lines not on this page · raw message
net/packet/internal.h +5 -5
@@ -100,10 +100,12 @@ struct packet_sock {int copy_thresh;spinlock_t bind_lock;struct mutex pg_vec_lock; - unsigned int running:1, /* prot_hook is attached*/ - auxdata:1, +unsigned int running;/* bind_lock must be held */ + unsigned int auxdata:1, /* writer must hold sock lock */ origdev:1, - has_vnet_hdr:1; + has_vnet_hdr:1, + tp_loss:1, + tp_tx_has_off:1;int ifindex;/* bound device */ __be16 num;struct packet_mclist *mclist;
@@ -111,8 +113,6 @@ struct packet_sock {enum tpacket_versions tp_version;unsigned int tp_hdrlen;unsigned int tp_reserve; - unsigned int tp_loss:1; - unsigned int tp_tx_has_off:1;unsigned int tp_tstamp;struct net_device __rcu *cached_dev;int (*xmit)(struct sk_buff *skb);