Linux 3.4.91
Greg KH
maintainerI'm announcing the release of the 3.4.91 kernel.
All users of the 3.4 kernel series must upgrade.
The updated 3.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.4.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/powerpc/lib/crtsavres.S | 186 ++++++++++++++++++++++++++++ block/blk-core.c | 2 drivers/scsi/megaraid/megaraid_mm.c | 2 drivers/tty/n_tty.c | 2 drivers/video/tgafb.c | 15 +- include/linux/net.h | 23 +++ include/net/netfilter/nf_conntrack_extend.h | 4 include/trace/events/block.h | 33 ++++ kernel/trace/blktrace.c | 20 +-- kernel/tracepoint.c | 6 net/bridge/netfilter/ebtables.c | 5 net/ipv4/netfilter/arp_tables.c | 6 net/ipv4/netfilter/ip_tables.c | 6 net/ipv6/netfilter/ip6_tables.c | 6 scripts/mod/modpost.c | 8 - 16 files changed, 296 insertions(+), 30 deletions(-)
Andreas Schwab (1):
powerpc: Add vr save/restore functions
Andrey Vagin (1):
netfilter: nf_conntrack: reserve two bytes for nf_ct_ext->len
Dan Carpenter (1):
SCSI: megaraid: missing bounds check in mimd_to_kioc()
Greg Kroah-Hartman (1):
Linux 3.4.91
Joe Perches (1):
net: Add net_ratelimited_function and net_<level>_ratelimited macros
Mikulas Patocka (1):
tgafb: fix mode setting with fbset
Peter Hurley (1):
n_tty: Fix n_tty_write crash when echoing in raw mode
Roman Pen (1):
blktrace: fix accounting of partially completed requests
Steven Rostedt (Red Hat) (1):
tracepoint: Do not waste memory on mods with no tracepoints
Thomas Graf (1):
netfilter: Can't fail and free after table replacement
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 4 -SUBLEVEL = 90 +SUBLEVEL = 91 EXTRAVERSION = NAME = Saber-toothed Squirrel
arch/powerpc/lib/crtsavres.S +186 -0
198 lines not on this page · raw message
block/blk-core.c +1 -1
@@ -2104,7 +2104,7 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes)if (!req->bio)return false; -trace_block_rq_complete (req->q, req); +trace_block_rq_complete (req->q, req, nr_bytes);/* * For fs requests, rq is just carrier of independent bio's
drivers/scsi/megaraid/megaraid_mm.c +2 -0
@@ -486,6 +486,8 @@ mimd_to_kioc(mimd_t __user *umimd, mraid_mmadp_t *adp, uioc_t *kioc) pthru32->dataxferaddr = kioc->buf_paddr;if (kioc->data_dir &UIOC_WR ) { +if (pthru32->dataxferlen > kioc->xferlen) +return -EINVAL ;if (copy_from_user (kioc->buf_vaddr, kioc->user_data, pthru32->dataxferlen)) {return (-EFAULT );
drivers/tty/n_tty.c +2 -0
@@ -1996,7 +1996,9 @@ static ssize_t n_tty_write(struct tty_struct *tty, struct file *file, tty->ops->flush_chars (tty); }else {while (nr >0 ) { +mutex_lock (&tty->output_lock); c = tty->ops->write (tty, b, nr); +mutex_unlock (&tty->output_lock);if (c <0 ) { retval = c; goto break_out;
drivers/video/tgafb.c +12 -3
@@ -192,6 +192,8 @@ tgafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)if (var->xres_virtual != var->xres || var->yres_virtual != var->yres)return -EINVAL ; +if (var->xres * var->yres * (var->bits_per_pixel >>3 ) > info->fix.smem_len) +return -EINVAL ;if (var->nonstd)return -EINVAL ;if (1000000000 / var->pixclock >TGA_PLL_MAX_FREQ )
@@ -272,6 +274,7 @@ tgafb_set_par(struct fb_info *info) par->yres = info->var.yres; par->pll_freq = pll_freq =1000000000 / info->var.pixclock; par->bits_per_pixel = info->var.bits_per_pixel; + info->fix.line_length = par->xres * (par->bits_per_pixel >>3 ); tga_type = par->tga_type;
@@ -1318,6 +1321,7 @@ tgafb_init_fix(struct fb_info *info)int tga_bus_tc =TGA_BUS_TC (par->dev);u8 tga_type = par->tga_type;const char *tga_type_name =NULL ; +unsigned memory_size;switch (tga_type) {case TGA_TYPE_8PLANE :
@@ -1325,21 +1329,25 @@ tgafb_init_fix(struct fb_info *info) tga_type_name ="Digital ZLXp-E1" ;if (tga_bus_tc) tga_type_name ="Digital ZLX-E1" ; + memory_size =2097152 ;break ;case TGA_TYPE_24PLANE :if (tga_bus_pci) tga_type_name ="Digital ZLXp-E2" ;if (tga_bus_tc) tga_type_name ="Digital ZLX-E2" ; + memory_size =8388608 ;break ;case TGA_TYPE_24PLUSZ :if (tga_bus_pci) tga_type_name ="Digital ZLXp-E3" ;if (tga_bus_tc) tga_type_name ="Digital ZLX-E3" ; + memory_size =16777216 ;break ;default : tga_type_name ="Unknown" ; + memory_size =16777216 ;break ; }
@@ -1351,9 +1359,8 @@ tgafb_init_fix(struct fb_info *info) ? FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_DIRECTCOLOR); - info->fix.line_length = par->xres * (par->bits_per_pixel >>3 ); info->fix.smem_start = (size_t ) par->tga_fb_base; - info->fix.smem_len = info->fix.line_length * par->yres; + info->fix.smem_len = memory_size; info->fix.mmio_start = (size_t ) par->tga_regs_base; info->fix.mmio_len =512 ;
@@ -1478,6 +1485,9 @@ tgafb_register(struct device *dev) modedb_tga = &modedb_tc; modedbsize_tga =1 ; } + +tgafb_init_fix (info); + ret = fb_find_mode(&info->var, info, mode_option ? mode_option : mode_option_tga, modedb_tga, modedbsize_tga, NULL,
@@ -1495,7 +1505,6 @@ tgafb_register(struct device *dev) }tgafb_set_par (info); -tgafb_init_fix (info);if (register_framebuffer (info) <0 ) {printk (KERN_ERR "tgafb: Could not register framebuffer\n" );
include/linux/net.h +23 -0
@@ -259,6 +259,29 @@ extern struct socket *sockfd_lookup(int fd, int *err);#define sockfd_put (sock) fput(sock->file)extern int net_ratelimit (void ); +#define net_ratelimited_function (function, ...) \ +do { \ + if (net_ratelimit()) \ + function(__VA_ARGS__); \ +} while (0) + +#define net_emerg_ratelimited (fmt, ...) \ + net_ratelimited_function(pr_emerg, fmt, ##__VA_ARGS__) +#define net_alert_ratelimited (fmt, ...) \ + net_ratelimited_function(pr_alert, fmt, ##__VA_ARGS__) +#define net_crit_ratelimited (fmt, ...) \ + net_ratelimited_function(pr_crit, fmt, ##__VA_ARGS__) +#define net_err_ratelimited (fmt, ...) \ + net_ratelimited_function(pr_err, fmt, ##__VA_ARGS__) +#define net_notice_ratelimited (fmt, ...) \ + net_ratelimited_function(pr_notice, fmt, ##__VA_ARGS__) +#define net_warn_ratelimited (fmt, ...) \ + net_ratelimited_function(pr_warn, fmt, ##__VA_ARGS__) +#define net_info_ratelimited (fmt, ...) \ + net_ratelimited_function(pr_info, fmt, ##__VA_ARGS__) +#define net_dbg_ratelimited (fmt, ...) \ + net_ratelimited_function(pr_debug, fmt, ##__VA_ARGS__) +#define net_random () random32()#define net_srandom (seed) srandom32((__force u32)seed)
include/net/netfilter/nf_conntrack_extend.h +2 -2
@@ -37,8 +37,8 @@ enum nf_ct_ext_id {/* Extensions: optional stuff which isn't permanently in struct. */ struct nf_ct_ext {struct rcu_head rcu; -u8 offset[NF_CT_EXT_NUM ]; -u8 len; +u16 offset[NF_CT_EXT_NUM ]; +u16 len;char data[0 ]; };
include/trace/events/block.h +30 -3
@@ -81,6 +81,7 @@ DEFINE_EVENT(block_rq_with_error, block_rq_requeue,* block_rq_complete - block IO operation completed by device driver * @q: queue containing the block operation request * @rq: block operations request +* @nr_bytes: number of completed bytes * * The block_rq_complete tracepoint event indicates that some portion * of operation request has been completed by the device driver. If
@@ -88,11 +89,37 @@ DEFINE_EVENT(block_rq_with_error, block_rq_requeue,* do for the request. If @rq->bio is non-NULL then there is * additional work required to complete the request. */ -DEFINE_EVENT (block_rq_with_error, block_rq_complete, +TRACE_EVENT (block_rq_complete, - TP_PROTO(struct request_queue *q, struct request *rq), + TP_PROTO(struct request_queue *q, struct request *rq, + unsigned int nr_bytes), -TP_ARGS (q, rq) +TP_ARGS (q, rq, nr_bytes), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( sector_t, sector ) + __field( unsigned int, nr_sector ) + __field( int, errors ) + __array( char, rwbs, RWBS_LEN ) +__dynamic_array ( char, cmd,blk_cmd_buf_len (rq) ) + ), + +TP_fast_assign ( + __entry->dev = rq->rq_disk ? disk_devt(rq->rq_disk) : 0; + __entry->sector = blk_rq_pos(rq); + __entry->nr_sector = nr_bytes >> 9; + __entry->errors = rq->errors; + + blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, nr_bytes); + blk_dump_cmd(__get_str(cmd), rq); + ), + +TP_printk ("%d,%d %s (%s) %llu + %u [%d]" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->rwbs,__get_str (cmd), + (unsigned long long )__entry->sector, + __entry->nr_sector, __entry->errors) ); DECLARE_EVENT_CLASS(block_rq,
kernel/trace/blktrace.c +11 -9
@@ -685,6 +685,7 @@ void blk_trace_shutdown(struct request_queue *q)* blk_add_trace_rq - Add a trace for a request oriented action * @q: queue the io is for * @rq: the source request +* @nr_bytes: number of completed bytes * @what: the action * * Description:
@@ -692,7 +693,7 @@ void blk_trace_shutdown(struct request_queue *q)* **/ static void blk_add_trace_rq (struct request_queue *q,struct request *rq, -u32 what) +unsigned int nr_bytes,u32 what) {struct blk_trace *bt = q->blk_trace;
@@ -701,11 +702,11 @@ static void blk_add_trace_rq(struct request_queue *q, struct request *rq,if (rq->cmd_type ==REQ_TYPE_BLOCK_PC ) { what |=BLK_TC_ACT (BLK_TC_PC ); -__blk_add_trace (bt,0 ,blk_rq_bytes (rq), rq->cmd_flags, +__blk_add_trace (bt,0 , nr_bytes, rq->cmd_flags, what, rq->errors, rq->cmd_len, rq->cmd); }else { what |=BLK_TC_ACT (BLK_TC_FS ); -__blk_add_trace (bt,blk_rq_pos (rq),blk_rq_bytes (rq), +__blk_add_trace (bt,blk_rq_pos (rq), nr_bytes, rq->cmd_flags, what, rq->errors,0 ,NULL ); } }
@@ -713,33 +714,34 @@ static void blk_add_trace_rq(struct request_queue *q, struct request *rq,static void blk_add_trace_rq_abort (void *ignore,struct request_queue *q,struct request *rq) { -blk_add_trace_rq (q, rq,BLK_TA_ABORT ); +blk_add_trace_rq (q, rq,blk_rq_bytes (rq),BLK_TA_ABORT ); }static void blk_add_trace_rq_insert (void *ignore,struct request_queue *q,struct request *rq) { -blk_add_trace_rq (q, rq,BLK_TA_INSERT ); +blk_add_trace_rq (q, rq,blk_rq_bytes (rq),BLK_TA_INSERT ); }static void blk_add_trace_rq_issue (void *ignore,struct request_queue *q,struct request *rq) { -blk_add_trace_rq (q, rq,BLK_TA_ISSUE ); +blk_add_trace_rq (q, rq,blk_rq_bytes (rq),BLK_TA_ISSUE ); }static void blk_add_trace_rq_requeue (void *ignore,struct request_queue *q,struct request *rq) { -blk_add_trace_rq (q, rq,BLK_TA_REQUEUE ); +blk_add_trace_rq (q, rq,blk_rq_bytes (rq),BLK_TA_REQUEUE ); }static void blk_add_trace_rq_complete (void *ignore,struct request_queue *q, -struct request *rq) +struct request *rq, +unsigned int nr_bytes) { -blk_add_trace_rq (q, rq,BLK_TA_COMPLETE ); +blk_add_trace_rq (q, rq, nr_bytes,BLK_TA_COMPLETE ); }/**
kernel/tracepoint.c +6 -0
@@ -638,6 +638,9 @@ static int tracepoint_module_coming(struct module *mod)struct tp_module *tp_mod, *iter;int ret =0 ; +if (!mod->num_tracepoints) +return 0 ; +/* * We skip modules that taint the kernel, especially those with different * module headers (for forced load), to make sure we don't cause a crash.
@@ -681,6 +684,9 @@ static int tracepoint_module_going(struct module *mod) {struct tp_module *pos; +if (!mod->num_tracepoints) +return 0 ; +mutex_lock (&tracepoints_mutex);tracepoint_update_probe_range (mod->tracepoints_ptrs, mod->tracepoints_ptrs + mod->num_tracepoints);
net/bridge/netfilter/ebtables.c +2 -3
@@ -1044,10 +1044,9 @@ static int do_replace_finish(struct net *net, struct ebt_replace *repl,if (repl->num_counters &©_to_user (repl->counters, counterstmp, repl->num_counters *sizeof (struct ebt_counter ))) { - ret = -EFAULT ; +/* Silent error, can't fail, new table is already in place */ +net_warn_ratelimited ("ebtables: counters copy to user failed while replacing table\n" ); } -else - ret =0 ;/* decrease module count and free resources */ EBT_ENTRY_ITERATE(table->entries, table->entries_size,
net/ipv4/netfilter/arp_tables.c +4 -2
@@ -1039,8 +1039,10 @@ static int __do_replace(struct net *net, const char *name,xt_free_table_info (oldinfo);if (copy_to_user (counters_ptr, counters, -sizeof (struct xt_counters ) * num_counters) !=0 ) - ret = -EFAULT ; +sizeof (struct xt_counters ) * num_counters) !=0 ) { +/* Silent error, can't fail, new table is already in place */ +net_warn_ratelimited ("arptables: counters copy to user failed while replacing table\n" ); + }vfree (counters);xt_table_unlock (t);return ret;
net/ipv4/netfilter/ip_tables.c +4 -2
@@ -1227,8 +1227,10 @@ __do_replace(struct net *net, const char *name, unsigned int valid_hooks,xt_free_table_info (oldinfo);if (copy_to_user (counters_ptr, counters, -sizeof (struct xt_counters ) * num_counters) !=0 ) - ret = -EFAULT ; +sizeof (struct xt_counters ) * num_counters) !=0 ) { +/* Silent error, can't fail, new table is already in place */ +net_warn_ratelimited ("iptables: counters copy to user failed while replacing table\n" ); + }vfree (counters);xt_table_unlock (t);return ret;
net/ipv6/netfilter/ip6_tables.c +4 -2
@@ -1236,8 +1236,10 @@ __do_replace(struct net *net, const char *name, unsigned int valid_hooks,xt_free_table_info (oldinfo);if (copy_to_user (counters_ptr, counters, -sizeof (struct xt_counters ) * num_counters) !=0 ) - ret = -EFAULT ; +sizeof (struct xt_counters ) * num_counters) !=0 ) { +/* Silent error, can't fail, new table is already in place */ +net_warn_ratelimited ("ip6tables: counters copy to user failed while replacing table\n" ); + }vfree (counters);xt_table_unlock (t);return ret;
scripts/mod/modpost.c +6 -2
@@ -569,12 +569,16 @@ static int ignore_undef_symbol(struct elf_info *info, const char *symname)if (strncmp (symname,"_restgpr_" ,sizeof ("_restgpr_" ) -1 ) ==0 ||strncmp (symname,"_savegpr_" ,sizeof ("_savegpr_" ) -1 ) ==0 ||strncmp (symname,"_rest32gpr_" ,sizeof ("_rest32gpr_" ) -1 ) ==0 || -strncmp (symname,"_save32gpr_" ,sizeof ("_save32gpr_" ) -1 ) ==0 ) +strncmp (symname,"_save32gpr_" ,sizeof ("_save32gpr_" ) -1 ) ==0 || +strncmp (symname,"_restvr_" ,sizeof ("_restvr_" ) -1 ) ==0 || +strncmp (symname,"_savevr_" ,sizeof ("_savevr_" ) -1 ) ==0 )return 1 ;if (info->hdr->e_machine ==EM_PPC64 )/* Special register function linked on all modules during final link of .ko */ if (strncmp (symname,"_restgpr0_" ,sizeof ("_restgpr0_" ) -1 ) ==0 || -strncmp (symname,"_savegpr0_" ,sizeof ("_savegpr0_" ) -1 ) ==0 ) +strncmp (symname,"_savegpr0_" ,sizeof ("_savegpr0_" ) -1 ) ==0 || +strncmp (symname,"_restvr_" ,sizeof ("_restvr_" ) -1 ) ==0 || +strncmp (symname,"_savevr_" ,sizeof ("_savevr_" ) -1 ) ==0 )return 1 ;/* Do not ignore this symbol */ return 0 ;