Linux 2.6.32.43
Subsystems (36)
I'm announcing the release of the 2.6.32.43 kernel.
All users of the 2.6.32 series must upgrade.
The updated 2.6.32.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/longterm/linux-2.6.32.y.git
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/longterm/linux-2.6.32.y.git;a=summarythanks,
greg k-h
------------
Makefile | 2 arch/um/kernel/dyn.lds.S | 14 ++++- arch/um/kernel/uml.lds.S | 17 ++++++ arch/um/os-Linux/mem.c | 1 arch/x86/xen/mmu.c | 9 ++- block/cfq-iosched.c | 8 ++ drivers/char/tty_ldisc.c | 4 + drivers/i2c/busses/i2c-taos-evm.c | 8 +- drivers/md/md.c | 1 drivers/media/video/uvc/uvc_queue.c | 2 drivers/net/hamradio/6pack.c | 4 - drivers/net/hamradio/mkiss.c | 4 - drivers/net/wireless/ath/ath5k/eeprom.c | 8 +- drivers/usb/core/driver.c | 11 +++ drivers/usb/core/hub.c | 13 ++-- drivers/usb/host/xhci-hcd.c | 22 ++++++- drivers/watchdog/mtx-1_wdt.c | 8 ++ fs/inode.c | 22 +++++-- fs/nilfs2/btnode.c | 13 ---- fs/nilfs2/btnode.h | 1 fs/nilfs2/super.c | 2 include/asm-generic/bug.h | 16 +++++ include/linux/clocksource.h | 1 include/linux/fs.h | 2 include/linux/if_packet.h | 2 include/net/netlink.h | 2 kernel/power/snapshot.c | 89 ++++++++++++++++++++++++-------- kernel/power/user.c | 4 + kernel/taskstats.c | 15 ++++- kernel/time/clocksource.c | 24 ++++---- lib/debugobjects.c | 2 mm/hugetlb.c | 8 ++ mm/ksm.c | 6 ++ mm/memory.c | 2 mm/migrate.c | 2 net/core/filter.c | 4 + net/ipv4/af_inet.c | 3 + net/ipv4/inet_diag.c | 14 ++--- net/ipv4/udp.c | 3 + net/ipv6/udp.c | 5 + net/packet/af_packet.c | 2 net/sunrpc/auth_gss/auth_gss.c | 4 - net/sunrpc/clnt.c | 2 43 files changed, 284 insertions(+), 102 deletions(-)
Alan Stern (2):
USB: don't let errors prevent system sleep
USB: don't let the hub driver prevent system sleep
Andrea Arcangeli (1):
migrate: don't account swapcache as shmem
Arnd Bergmann (1):
6pack,mkiss: fix lock inconsistency
Eric Dumazet (2):
inet_diag: fix inet_diag_bc_audit()
af_packet: prevent information leak
Eugene A. Shatokhin (1):
ath5k: fix memory leak when fewer than N_PD_CURVES are in use
Florian Fainelli (1):
watchdog: mtx1-wdt: request gpio before using it
Greg Kroah-Hartman (1):
Linux 2.6.32.43
Hugh Dickins (1):
ksm: fix NULL pointer dereference in scan_get_next_rmap_item()
Jean Delvare (1):
i2c-taos-evm: Fix log messages
Jens Axboe (1):
cfq-iosched: fix locking around ioc->ioc_data assignment
Jiri Slaby (1):
TTY: ldisc, do not close until there are readers
Joe Perches (2):
bug.h: Add WARN_RATELIMIT
net: filter: Use WARN_RATELIMIT
Liu Aleaxander (1):
um: os-linux/mem.c needs sys/stat.h
Marcin Slusarz (1):
debugobjects: Fix boot crash when kmemleak and debugobjects enabled
Marcus Meissner (1):
net/ipv4: Check for mistakenly passed in non-IPv4 address
Michal Kubecek (1):
PM: Free memory bitmaps if opening /dev/snapshot fails
Miklos Szeredi (1):
mm: prevent concurrent unmap_mapping_range() on the same inode
NeilBrown (1):
md: avoid endless recovery loop when waiting for fail device to complete.
Nelson Elhage (1):
netlink: Make nlmsg_find_attr take a const nlmsghdr*.
Rafael Aquini (1):
mm: fix negative commitlimit when gigantic hugepages are allocated
Rafael J. Wysocki (2):
PM / Hibernate: Avoid hitting OOM during preallocation of memory PM / Hibernate: Fix free_unnecessary_pages()
Roland McGrath (1):
uml: fix CONFIG_STATIC_LINK=y build failure with newer glibc
Sarah Sharp (1):
xhci: Reject double add of active endpoints.
Shaohua Li (1):
cfq-iosched: fix a rcu warning
Sjoerd Simons (1):
uvcvideo: Remove buffers from the queues when freeing
Stefano Stabellini (1):
xen: partially revert "xen: set max_pfn_mapped to the last pfn mapped"
Thomas Gleixner (1):
clocksource: Make watchdog robust vs. interruption
Trond Myklebust (1):
SUNRPC: Ensure the RPC client only quits on fatal signals
Vasiliy Kulikov (1):
taskstats: don't allow duplicate entries in listener mode
Xufeng Zhang (2):
ipv6/udp: Use the correct variable to determine non-blocking condition udp/recvmsg: Clear MSG_TRUNC flag when starting over for a new packet
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 32 -EXTRAVERSION = .42 +EXTRAVERSION = .43 NAME = Man-Eating Seals of Antiquity # *DOCUMENTATION*
arch/um/kernel/dyn.lds.S +12 -2
@@ -50,8 +50,18 @@ SECTIONS .rela.got : { *(.rela.got) } .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } - .rel.plt : { *(.rel.plt) } - .rela.plt : { *(.rela.plt) } + .rel.plt : { + *(.rel.plt) + PROVIDE_HIDDEN(__rel_iplt_start = .); + *(.rel.iplt) + PROVIDE_HIDDEN(__rel_iplt_end = .); + } + .rela.plt : { + *(.rela.plt) + PROVIDE_HIDDEN(__rela_iplt_start = .); + *(.rela.iplt) + PROVIDE_HIDDEN(__rela_iplt_end = .); + } .init : { KEEP (*(.init)) } =0x90909090
arch/um/kernel/uml.lds.S +17 -0
@@ -43,6 +43,23 @@ SECTIONS __syscall_stub_end = .; } + /* + * These are needed even in a static link, even if they wind up being empty. + * Newer glibc needs these __rel{,a}_iplt_{start,end} symbols. + */ + .rel.plt : { + *(.rel.plt) + PROVIDE_HIDDEN(__rel_iplt_start = .); + *(.rel.iplt) + PROVIDE_HIDDEN(__rel_iplt_end = .); + } + .rela.plt : { + *(.rela.plt) + PROVIDE_HIDDEN(__rela_iplt_start = .); + *(.rela.iplt) + PROVIDE_HIDDEN(__rela_iplt_end = .); + } + #include "asm/common.lds.S" init.data : { INIT_DATA }
arch/um/os-Linux/mem.c +1 -0
@@ -10,6 +10,7 @@#include <errno.h> #include <fcntl.h> #include <string.h> +#include <sys/stat.h> #include <sys/mman.h> #include <sys/param.h> #include "init.h"
arch/x86/xen/mmu.c +8 -1
@@ -1658,6 +1658,11 @@ static __init void xen_map_identity_early(pmd_t *pmd, unsigned long max_pfn)for (pteidx =0 ; pteidx <PTRS_PER_PTE ; pteidx++, pfn++) {pte_t pte; +#ifdef CONFIG_X86_32 +if (pfn > max_pfn_mapped) + max_pfn_mapped = pfn; +#endif +if (!pte_none (pte_page[pteidx]))continue ;
@@ -1770,7 +1775,9 @@ __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd, {pmd_t *kernel_pmd; - max_pfn_mapped =PFN_DOWN (__pa (xen_start_info->mfn_list)); + max_pfn_mapped =PFN_DOWN (__pa (xen_start_info->pt_base) + + xen_start_info->nr_pt_frames *PAGE_SIZE + +512 *1024 ); kernel_pmd =m2v (pgd[KERNEL_PGD_BOUNDARY ].pgd);memcpy (level2_kernel_pgt, kernel_pmd,sizeof (pmd_t) *PTRS_PER_PMD );
block/cfq-iosched.c +7 -1
@@ -1540,8 +1540,14 @@ static void __cfq_exit_single_io_context(struct cfq_data *cfqd, cic->dead_key = (unsigned long ) cic->key; cic->key =NULL ; -if (ioc->ioc_data == cic) +rcu_read_lock (); +if (rcu_dereference (ioc->ioc_data) == cic) { +rcu_read_unlock (); +spin_lock (&ioc->lock);rcu_assign_pointer (ioc->ioc_data,NULL ); +spin_unlock (&ioc->lock); + }else +rcu_read_unlock ();if (cic->cfqq[BLK_RW_ASYNC ]) {cfq_exit_cfqq (cfqd, cic->cfqq[BLK_RW_ASYNC ]);
drivers/char/tty_ldisc.c +3 -1
@@ -539,7 +539,7 @@ static int tty_ldisc_halt(struct tty_struct *tty)static int tty_ldisc_wait_idle (struct tty_struct *tty) {int ret; - ret =wait_event_interruptible_timeout (tty_ldisc_idle, + ret =wait_event_timeout (tty_ldisc_idle,atomic_read (&tty->ldisc->users) ==1 ,5 *HZ );if (ret <0 )return ret;
@@ -735,6 +735,8 @@ static int tty_ldisc_reinit(struct tty_struct *tty, int ldisc)if (IS_ERR (ld))return -1 ; +WARN_ON_ONCE (tty_ldisc_wait_idle (tty)); +tty_ldisc_close (tty, tty->ldisc);tty_ldisc_put (tty->ldisc); tty->ldisc =NULL ;
drivers/i2c/busses/i2c-taos-evm.c +4 -4
@@ -234,7 +234,7 @@ static int taos_connect(struct serio *serio, struct serio_driver *drv)if (taos->state !=TAOS_STATE_IDLE ) { err = -ENODEV ; -dev_dbg (&serio->dev,"TAOS EVM reset failed (state=%d, " +dev_err (&serio->dev,"TAOS EVM reset failed (state=%d, " "pos=%d)\n" , taos->state, taos->pos); goto exit_close; }
@@ -255,7 +255,7 @@ static int taos_connect(struct serio *serio, struct serio_driver *drv) msecs_to_jiffies(250));if (taos->state !=TAOS_STATE_IDLE ) { err = -ENODEV ; -dev_err (&adapter->dev,"Echo off failed " +dev_err (&serio->dev,"TAOS EVM echo off failed " "(state=%d)\n" , taos->state); goto exit_close; }
@@ -263,7 +263,7 @@ static int taos_connect(struct serio *serio, struct serio_driver *drv) err =i2c_add_adapter (adapter);if (err) goto exit_close; -dev_dbg (&serio->dev,"Connected to TAOS EVM\n" ); +dev_info (&serio->dev,"Connected to TAOS EVM\n" ); taos->client =taos_instantiate_device (adapter);return 0 ;
@@ -288,7 +288,7 @@ static void taos_disconnect(struct serio *serio)serio_set_drvdata (serio,NULL );kfree (taos); -dev_dbg (&serio->dev,"Disconnected from TAOS EVM\n" ); +dev_info (&serio->dev,"Disconnected from TAOS EVM\n" ); }static struct serio_device_id taos_serio_ids[] = {
drivers/md/md.c +1 -0
@@ -6623,6 +6623,7 @@ static int remove_and_add_spares(mddev_t *mddev)list_for_each_entry (rdev, &mddev->disks, same_set) {if (rdev->raid_disk >=0 && !test_bit (In_sync, &rdev->flags) && + !test_bit (Faulty, &rdev->flags) && !test_bit (Blocked, &rdev->flags)) spares++; if (rdev->raid_disk < 0
drivers/media/video/uvc/uvc_queue.c +2 -0
@@ -165,6 +165,8 @@ int uvc_free_buffers(struct uvc_video_queue *queue) }if (queue->count) { +uvc_queue_cancel (queue,0 ); +INIT_LIST_HEAD (&queue->mainqueue);vfree (queue->mem); queue->count =0 ; }
drivers/net/hamradio/6pack.c +2 -2
@@ -690,10 +690,10 @@ static void sixpack_close(struct tty_struct *tty) {struct sixpack *sp; -write_lock (&disc_data_lock); +write_lock_bh (&disc_data_lock); sp = tty->disc_data; tty->disc_data =NULL ; -write_unlock (&disc_data_lock); +write_unlock_bh (&disc_data_lock);if (!sp)return ;
drivers/net/hamradio/mkiss.c +2 -2
@@ -811,10 +811,10 @@ static void mkiss_close(struct tty_struct *tty) {struct mkiss *ax; -write_lock (&disc_data_lock); +write_lock_bh (&disc_data_lock); ax = tty->disc_data; tty->disc_data =NULL ; -write_unlock (&disc_data_lock); +write_unlock_bh (&disc_data_lock);if (!ax)return ;
drivers/net/wireless/ath/ath5k/eeprom.c +3 -5
@@ -1588,14 +1588,12 @@ ath5k_eeprom_free_pcal_info(struct ath5k_hw *ah, int mode)if (!chinfo[pier].pd_curves)continue ; -for (pdg =0 ; pdg < ee->ee_pd_gains[mode]; pdg++) { +for (pdg =0 ; pdg <AR5K_EEPROM_N_PD_CURVES ; pdg++) {struct ath5k_pdgain_info *pd = &chinfo[pier].pd_curves[pdg]; -if (pd !=NULL ) { -kfree (pd->pd_step); -kfree (pd->pd_pwr); - } +kfree (pd->pd_step); +kfree (pd->pd_pwr); }kfree (chinfo[pier].pd_curves);
drivers/usb/core/driver.c +10 -1
@@ -1187,13 +1187,22 @@ static int usb_suspend_both(struct usb_device *udev, pm_message_t msg)for (; i < udev->actconfig->desc.bNumInterfaces; i++) { intf = udev->actconfig->interface[i]; status =usb_suspend_interface (udev, intf, msg); + +/* Ignore errors during system sleep transitions */ +if (!(msg.event &PM_EVENT_AUTO )) + status =0 ;if (status !=0 )break ; } } -if (status ==0 ) +if (status ==0 ) { status =usb_suspend_device (udev, msg); +/* Again, ignore errors during system sleep transitions */ +if (!(msg.event &PM_EVENT_AUTO )) + status =0 ; + } +/* If the suspend failed, resume interfaces that did get suspended */ if (status !=0 ) {pm_message_t msg2;
drivers/usb/core/hub.c +8 -5
@@ -2188,6 +2188,10 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg)USB_DEVICE_REMOTE_WAKEUP ,0 ,NULL ,0 , USB_CTRL_SET_TIMEOUT); + +/* System sleep transitions should never fail */ +if (!(msg.event &PM_EVENT_AUTO )) + status =0 ; }else {/* device has up to 10 msec to fully suspend */ dev_dbg(&udev->dev, "usb %ssuspend\n",
@@ -2427,16 +2431,15 @@ static int hub_suspend(struct usb_interface *intf, pm_message_t msg)struct usb_device *hdev = hub->hdev;unsigned port1; -/* fail if children aren't already suspended */ +/* Warn if children aren't already suspended */ for (port1 =1 ; port1 <= hdev->maxchild; port1++) {struct usb_device *udev; udev = hdev->children [port1-1 ];if (udev && udev->can_submit) { -if (!(msg.event &PM_EVENT_AUTO )) -dev_dbg (&intf->dev,"port %d nyet suspended\n" , - port1); -return -EBUSY ; +dev_warn (&intf->dev,"port %d nyet suspended\n" , port1); +if (msg.event &PM_EVENT_AUTO ) +return -EBUSY ; } }
drivers/usb/host/xhci-hcd.c +18 -4
@@ -979,6 +979,7 @@ int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev,u32 added_ctxs;unsigned int last_ctx;u32 new_add_flags, new_drop_flags, new_slot_info; +struct xhci_virt_device *virt_dev;int ret =0 ; ret =xhci_check_args (hcd, udev, ep,1 , __func__);
@@ -1007,11 +1008,25 @@ int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev,return -EINVAL ; } - in_ctx = xhci->devs[udev->slot_id]->in_ctx; - out_ctx = xhci->devs[udev->slot_id]->out_ctx; + virt_dev = xhci->devs[udev->slot_id]; + in_ctx = virt_dev->in_ctx; + out_ctx = virt_dev->out_ctx; ctrl_ctx =xhci_get_input_control_ctx (xhci, in_ctx); ep_index =xhci_get_endpoint_index (&ep->desc); ep_ctx =xhci_get_ep_ctx (xhci, out_ctx, ep_index); + +/* If this endpoint is already in use, and the upper layers are trying +* to add it again without dropping it, reject the addition. +*/ +if (virt_dev->eps[ep_index].ring && + !(le32_to_cpu (ctrl_ctx->drop_flags) & +xhci_get_endpoint_flag (&ep->desc))) { +xhci_warn (xhci,"Trying to add endpoint 0x%x " +"without dropping it.\n" , + (unsigned int ) ep->desc.bEndpointAddress); +return -EINVAL ; + } +/* If the HCD has already noted the endpoint is enabled, * ignore this request. */
@@ -1026,8 +1041,7 @@ int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev,* process context, not interrupt context (or so documenation * for usb_set_interface() and usb_set_configuration() claim). */ -if (xhci_endpoint_init (xhci, xhci->devs[udev->slot_id], - udev, ep,GFP_KERNEL ) <0 ) { +if (xhci_endpoint_init (xhci, virt_dev, udev, ep,GFP_NOIO ) <0 ) {dev_dbg (&udev->dev,"%s - could not initialize ep %#x\n" , __func__, ep->desc.bEndpointAddress);return -ENOMEM ;
drivers/watchdog/mtx-1_wdt.c +8 -0
@@ -211,6 +211,12 @@ static int __devinit mtx1_wdt_probe(struct platform_device *pdev)int ret; mtx1_wdt_device.gpio = pdev->resource[0 ].start; + ret =gpio_request_one (mtx1_wdt_device.gpio, +GPIOF_OUT_INIT_HIGH ,"mtx1-wdt" ); +if (ret <0 ) { +dev_err (&pdev->dev,"failed to request gpio" ); +return ret; + }spin_lock_init (&mtx1_wdt_device.lock);init_completion (&mtx1_wdt_device.stop);
@@ -236,6 +242,8 @@ static int __devexit mtx1_wdt_remove(struct platform_device *pdev) mtx1_wdt_device.queue =0 ;wait_for_completion (&mtx1_wdt_device.stop); } + +gpio_free (mtx1_wdt_device.gpio);misc_deregister (&mtx1_wdt_misc);return 0 ; }
fs/inode.c +15 -7
@@ -256,6 +256,20 @@ void destroy_inode(struct inode *inode)kmem_cache_free (inode_cachep, (inode)); } +void address_space_init_once (struct address_space *mapping) +{ +memset (mapping,0 ,sizeof (*mapping)); +INIT_RADIX_TREE (&mapping->page_tree,GFP_ATOMIC ); +spin_lock_init (&mapping->tree_lock); +spin_lock_init (&mapping->i_mmap_lock); +INIT_LIST_HEAD (&mapping->private_list); +spin_lock_init (&mapping->private_lock); +INIT_RAW_PRIO_TREE_ROOT (&mapping->i_mmap); +INIT_LIST_HEAD (&mapping->i_mmap_nonlinear); +mutex_init (&mapping->unmap_mutex); +} +EXPORT_SYMBOL (address_space_init_once); +/* * These are initializations that only need to be done * once, because the fields are idempotent across use
@@ -267,13 +281,7 @@ void inode_init_once(struct inode *inode)INIT_HLIST_NODE (&inode->i_hash);INIT_LIST_HEAD (&inode->i_dentry);INIT_LIST_HEAD (&inode->i_devices); -INIT_RADIX_TREE (&inode->i_data.page_tree,GFP_ATOMIC ); -spin_lock_init (&inode->i_data.tree_lock); -spin_lock_init (&inode->i_data.i_mmap_lock); -INIT_LIST_HEAD (&inode->i_data.private_list); -spin_lock_init (&inode->i_data.private_lock); -INIT_RAW_PRIO_TREE_ROOT (&inode->i_data.i_mmap); -INIT_LIST_HEAD (&inode->i_data.i_mmap_nonlinear); +address_space_init_once (&inode->i_data);i_size_ordered_init (inode);#ifdef CONFIG_INOTIFY INIT_LIST_HEAD (&inode->inotify_watches);
fs/nilfs2/btnode.c +0 -13
@@ -34,19 +34,6 @@#include "btnode.h" -void nilfs_btnode_cache_init_once (struct address_space *btnc) -{ -memset (btnc,0 ,sizeof (*btnc)); -INIT_RADIX_TREE (&btnc->page_tree,GFP_ATOMIC ); -spin_lock_init (&btnc->tree_lock); -INIT_LIST_HEAD (&btnc->private_list); -spin_lock_init (&btnc->private_lock); - -spin_lock_init (&btnc->i_mmap_lock); -INIT_RAW_PRIO_TREE_ROOT (&btnc->i_mmap); -INIT_LIST_HEAD (&btnc->i_mmap_nonlinear); -} -static const struct address_space_operations def_btnode_aops = { .sync_page = block_sync_page, };
fs/nilfs2/btnode.h +0 -1
@@ -37,7 +37,6 @@ struct nilfs_btnode_chkey_ctxt {struct buffer_head *newbh; }; -void nilfs_btnode_cache_init_once (struct address_space *);void nilfs_btnode_cache_init (struct address_space *,struct backing_dev_info *);void nilfs_btnode_cache_clear (struct address_space *); int nilfs_btnode_submit_block(struct address_space *, __u64, sector_t,
fs/nilfs2/super.c +1 -1
@@ -166,7 +166,7 @@ static void init_once(void *obj)#ifdef CONFIG_NILFS_XATTR init_rwsem (&ii->xattr_sem);#endif -nilfs_btnode_cache_init_once (&ii->i_btnode_cache); +address_space_init_once (&ii->i_btnode_cache); ii->i_bmap = (struct nilfs_bmap *)&ii->i_bmap_union;inode_init_once (&ii->vfs_inode); }
include/asm-generic/bug.h +16 -0
@@ -50,6 +50,22 @@ struct bug_entry {#define BUG_ON (condition) do { if (unlikely(condition)) BUG(); } while(0)#endif +#define __WARN_RATELIMIT(condition, state, format...) \ +({ \ + int rtn = 0; \ + if (unlikely(__ratelimit(state))) \ + rtn = WARN(condition, format); \ + rtn; \ +}) + +#define WARN_RATELIMIT(condition, format...) \ +({ \ + static DEFINE_RATELIMIT_STATE(_rs, \ + DEFAULT_RATELIMIT_INTERVAL, \ + DEFAULT_RATELIMIT_BURST); \ + __WARN_RATELIMIT(condition, &_rs, format); \ +}) +/* * WARN(), WARN_ON(), WARN_ON_ONCE, and so on can be used to report * significant issues that need prompt attention if they should ever
include/linux/clocksource.h +1 -0
@@ -190,6 +190,7 @@ struct clocksource {#ifdef CONFIG_CLOCKSOURCE_WATCHDOG /* Watchdog related data, used by the framework */ struct list_head wd_list; +cycle_t cs_last;cycle_t wd_last;#endif };
include/linux/fs.h +2 -0
@@ -635,6 +635,7 @@ struct address_space {spinlock_t private_lock;/* for use by the address_space */ struct list_head private_list;/* ditto */ struct address_space *assoc_mapping;/* ditto */ +struct mutex unmap_mutex;/* to protect unmapping */ } __attribute__((aligned(sizeof(long))));/* * On most architectures that alignment is already the case; but
@@ -2158,6 +2159,7 @@ extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin);extern int inode_init_always (struct super_block *,struct inode *);extern void inode_init_once (struct inode *); +extern void address_space_init_once (struct address_space *mapping);extern void inode_add_to_lists (struct super_block *,struct inode *);extern void iput (struct inode *);extern struct inode *igrab (struct inode *);
include/linux/if_packet.h +2 -0
@@ -63,6 +63,7 @@ struct tpacket_auxdata__u16 tp_mac;__u16 tp_net;__u16 tp_vlan_tci; +__u16 tp_padding; };/* Rx ring - header status */
@@ -103,6 +104,7 @@ struct tpacket2_hdr__u32 tp_sec;__u32 tp_nsec;__u16 tp_vlan_tci; +__u16 tp_padding; };#define TPACKET2_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket2_hdr)) + sizeof(struct sockaddr_ll))
include/net/netlink.h +1 -1
@@ -384,7 +384,7 @@ static inline int nlmsg_parse(const struct nlmsghdr *nlh, int hdrlen,* * Returns the first attribute which matches the specified type. */ -static inline struct nlattr *nlmsg_find_attr (struct nlmsghdr *nlh, +static inline struct nlattr *nlmsg_find_attr (const struct nlmsghdr *nlh,int hdrlen,int attrtype) { return nla_find(nlmsg_attrdata(nlh, hdrlen),
kernel/power/snapshot.c +69 -20
134 lines not on this page · raw message
kernel/power/user.c +3 -1
@@ -113,8 +113,10 @@ static int snapshot_open(struct inode *inode, struct file *filp)if (error)pm_notifier_call_chain (PM_POST_RESTORE ); } -if (error) +if (error) { +free_basic_memory_bitmaps ();atomic_inc (&snapshot_device_available); + } data->frozen =0 ; data->ready =0 ; data->platform_support =0 ;
kernel/taskstats.c +12 -3
@@ -293,16 +293,18 @@ ret:static int add_del_listener (pid_t pid,const struct cpumask *mask,int isadd) {struct listener_list *listeners; -struct listener *s, *tmp; +struct listener *s, *tmp, *s2;unsigned int cpu;if (!cpumask_subset (mask, cpu_possible_mask))return -EINVAL ; + s =NULL ;if (isadd ==REGISTER ) {for_each_cpu (cpu, mask) { - s =kmalloc_node (sizeof (struct listener ),GFP_KERNEL , -cpu_to_node (cpu)); +if (!s) + s =kmalloc_node (sizeof (struct listener ), +GFP_KERNEL ,cpu_to_node (cpu));if (!s) goto cleanup; s->pid = pid;
@@ -311,9 +313,16 @@ static int add_del_listener(pid_t pid, const struct cpumask *mask, int isadd) listeners = &per_cpu (listener_array, cpu);down_write (&listeners->sem); +list_for_each_entry_safe (s2, tmp, &listeners->list, list) { +if (s2->pid == pid) + goto next_cpu; + }list_add (&s->list, &listeners->list); + s =NULL ; +next_cpu:up_write (&listeners->sem); } +kfree (s);return 0 ; }
kernel/time/clocksource.c +13 -11
@@ -131,7 +131,6 @@ static struct clocksource *watchdog;static struct timer_list watchdog_timer; static DECLARE_WORK(watchdog_work, clocksource_watchdog_work);static DEFINE_SPINLOCK (watchdog_lock); -static cycle_t watchdog_last;static int watchdog_running;static int clocksource_watchdog_kthread (void *data);
@@ -200,11 +199,6 @@ static void clocksource_watchdog(unsigned long data)if (!watchdog_running) goto out; - wdnow = watchdog->read (watchdog); - wd_nsec =clocksource_cyc2ns ((wdnow - watchdog_last) & watchdog->mask, - watchdog->mult, watchdog->shift); - watchdog_last = wdnow; -list_for_each_entry (cs, &watchdog_list, wd_list) {/* Clocksource already marked unstable? */
@@ -214,19 +208,28 @@ static void clocksource_watchdog(unsigned long data)continue ; } +local_irq_disable (); csnow = cs->read (cs); + wdnow = watchdog->read (watchdog); +local_irq_enable ();/* Clocksource initialized ? */ if (!(cs->flags &CLOCK_SOURCE_WATCHDOG )) { cs->flags |=CLOCK_SOURCE_WATCHDOG ; - cs->wd_last = csnow; + cs->wd_last = wdnow; + cs->cs_last = csnow;continue ; } -/* Check the deviation from the watchdog clocksource. */ - cs_nsec =clocksource_cyc2ns ((csnow - cs->wd_last) & + wd_nsec =clocksource_cyc2ns ((wdnow - cs->wd_last) & watchdog->mask, + watchdog->mult, watchdog->shift); + + cs_nsec =clocksource_cyc2ns ((csnow - cs->cs_last) & cs->mask, cs->mult, cs->shift); - cs->wd_last = csnow; + cs->cs_last = csnow; + cs->wd_last = wdnow; + +/* Check the deviation from the watchdog clocksource. */ if (abs (cs_nsec - wd_nsec) >WATCHDOG_THRESHOLD ) {clocksource_unstable (cs, cs_nsec - wd_nsec);continue ;
@@ -264,7 +267,6 @@ static inline void clocksource_start_watchdog(void)return ;init_timer (&watchdog_timer); watchdog_timer.function = clocksource_watchdog; - watchdog_last = watchdog->read (watchdog); watchdog_timer.expires = jiffies +WATCHDOG_INTERVAL ;add_timer_on (&watchdog_timer,cpumask_first (cpu_online_mask)); watchdog_running =1 ;
lib/debugobjects.c +1 -1
@@ -196,7 +196,7 @@ static void free_object(struct debug_obj *obj)* initialized: */ if (obj_pool_free >ODEBUG_POOL_SIZE && obj_cache) - sched = !work_pending (&debug_obj_work); + sched =keventd_up () && !work_pending (&debug_obj_work);hlist_add_head (&obj->node, &obj_pool); obj_pool_free++; obj_pool_used--;
mm/hugetlb.c +8 -0
@@ -1074,6 +1074,14 @@ static void __init gather_bootmem_prealloc(void)WARN_ON (page_count (page) !=1 );prep_compound_huge_page (page, h->order);prep_new_huge_page (h, page,page_to_nid (page)); +/* +* If we had gigantic hugepages allocated at boot time, we need +* to restore the 'stolen' pages to totalram_pages in order to +* fix confusing memory reports from free(1) and another +* side-effects, like CommitLimit going negative. +*/ +if (h->order > (MAX_ORDER -1 )) + totalram_pages +=1 << h->order; } }
mm/ksm.c +6 -0
@@ -1215,6 +1215,12 @@ static struct rmap_item *scan_get_next_rmap_item(struct page **page) slot = list_entry(slot->mm_list.next, struct mm_slot, mm_list); ksm_scan.mm_slot = slot;spin_unlock (&ksm_mmlist_lock); +/* +* Although we tested list_empty() above, a racing __ksm_exit +* of the last mm on the list may have removed it since then. +*/ +if (slot == &ksm_mm_head) +return NULL ; next_mm: ksm_scan.address =0 ; ksm_scan.rmap_item = list_entry(&slot->rmap_list,
mm/memory.c +2 -0
@@ -2454,6 +2454,7 @@ void unmap_mapping_range(struct address_space *mapping, details.last_index =ULONG_MAX ; details.i_mmap_lock = &mapping->i_mmap_lock; +mutex_lock (&mapping->unmap_mutex);spin_lock (&mapping->i_mmap_lock);/* Protect against endless unmapping loops */
@@ -2470,6 +2471,7 @@ void unmap_mapping_range(struct address_space *mapping,if (unlikely (!list_empty (&mapping->i_mmap_nonlinear)))unmap_mapping_range_list (&mapping->i_mmap_nonlinear, &details);spin_unlock (&mapping->i_mmap_lock); +mutex_unlock (&mapping->unmap_mutex); }EXPORT_SYMBOL (unmap_mapping_range);
mm/migrate.c +1 -1
@@ -314,7 +314,7 @@ static int migrate_page_move_mapping(struct address_space *mapping,*/ __dec_zone_page_state (page,NR_FILE_PAGES );__inc_zone_page_state (newpage,NR_FILE_PAGES ); -if (PageSwapBacked (page)) { +if (!PageSwapCache (page) &&PageSwapBacked (page)) {__dec_zone_page_state (page,NR_SHMEM );__inc_zone_page_state (newpage,NR_SHMEM ); }
net/core/filter.c +3 -1
@@ -291,7 +291,9 @@ load_b: mem[f_k] =X ;continue ;default : -WARN_ON (1 ); +WARN_RATELIMIT (1 ,"Unknown code:%u jt:%u tf:%u k:%u\n" , + fentry->code, fentry->jt, + fentry->jf, fentry->k);return 0 ; }
net/ipv4/af_inet.c +3 -0
@@ -460,6 +460,9 @@ int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)if (addr_len <sizeof (struct sockaddr_in )) goto out; +if (addr->sin_family !=AF_INET ) + goto out; + chk_addr_ret =inet_addr_type (sock_net (sk), addr->sin_addr.s_addr);/* Not specified by any standard per-se, however it breaks too
net/ipv4/inet_diag.c +6 -8
@@ -436,7 +436,7 @@ static int valid_cc(const void *bc, int len, int cc)return 0 ;if (cc == len)return 1 ; -if (op->yes <4 ) +if (op->yes <4 || op->yes &3 )return 0 ; len -= op->yes; bc += op->yes;
@@ -446,11 +446,11 @@ static int valid_cc(const void *bc, int len, int cc)static int inet_diag_bc_audit (const void *bytecode,int bytecode_len) { -const unsigned char *bc = bytecode; +const void *bc = bytecode;int len = bytecode_len;while (len >0 ) { -struct inet_diag_bc_op *op = (struct inet_diag_bc_op *)bc; +const struct inet_diag_bc_op *op = bc;//printk("BC: %d %d %d {%d} / %d\n", op->code, op->yes, op->no, op[1].no, len); switch (op->code) {
@@ -461,22 +461,20 @@ static int inet_diag_bc_audit(const void *bytecode, int bytecode_len)case INET_DIAG_BC_S_LE :case INET_DIAG_BC_D_GE :case INET_DIAG_BC_D_LE : -if (op->yes <4 || op->yes > len +4 ) -return -EINVAL ;case INET_DIAG_BC_JMP : -if (op->no <4 || op->no > len +4 ) +if (op->no <4 || op->no > len +4 || op->no &3 )return -EINVAL ;if (op->no < len && !valid_cc (bytecode, bytecode_len, len - op->no))return -EINVAL ;break ;case INET_DIAG_BC_NOP : -if (op->yes <4 || op->yes > len +4 ) -return -EINVAL ;break ;default :return -EINVAL ; } +if (op->yes <4 || op->yes > len +4 || op->yes &3 ) +return -EINVAL ; bc += op->yes; len -= op->yes; }
net/ipv4/udp.c +3 -0
@@ -1011,6 +1011,9 @@ csum_copy_err:if (noblock)return -EAGAIN ; + +/* starting over for a new packet */ + msg->msg_flags &= ~MSG_TRUNC ; goto try_again; }
net/ipv6/udp.c +4 -1
@@ -304,8 +304,11 @@ csum_copy_err: }release_sock (sk); -if (flags &MSG_DONTWAIT ) +if (noblock)return -EAGAIN ; + +/* starting over for a new packet */ + msg->msg_flags &= ~MSG_TRUNC ; goto try_again; }
net/packet/af_packet.c +2 -0
@@ -767,6 +767,7 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, h.h2->tp_sec = ts.tv_sec; h.h2->tp_nsec = ts.tv_nsec; h.h2->tp_vlan_tci = skb->vlan_tci; + h.h2->tp_padding =0 ; hdrlen =sizeof (*h.h2);break ;default :
@@ -1499,6 +1500,7 @@ static int packet_recvmsg(struct kiocb *iocb, struct socket *sock, aux.tp_net =skb_network_offset (skb); aux.tp_vlan_tci = skb->vlan_tci; + aux.tp_padding =0 ;put_cmsg (msg,SOL_PACKET ,PACKET_AUXDATA ,sizeof (aux), &aux); }
net/sunrpc/auth_gss/auth_gss.c +2 -2
@@ -548,13 +548,13 @@ retry: } inode = &gss_msg->inode->vfs_inode;for (;;) { -prepare_to_wait (&gss_msg->waitqueue, &wait,TASK_INTERRUPTIBLE ); +prepare_to_wait (&gss_msg->waitqueue, &wait,TASK_KILLABLE );spin_lock (&inode->i_lock);if (gss_msg->ctx !=NULL || gss_msg->msg.errno <0 ) {break ; }spin_unlock (&inode->i_lock); -if (signalled ()) { +if (fatal_signal_pending (current)) { err = -ERESTARTSYS ; goto out_intr; }
net/sunrpc/clnt.c +1 -1
@@ -938,7 +938,7 @@ call_allocate(struct rpc_task *task)dprintk ("RPC: %5u rpc_buffer allocation failed\n" , task->tk_pid); -if (RPC_IS_ASYNC (task) || !signalled ()) { +if (RPC_IS_ASYNC (task) || !fatal_signal_pending (current)) { task->tk_action = call_allocate;rpc_delay (task,HZ >>4 );return ;
Quoted 3 lines · Greg KH
Joe Perches (2):
bug.h: AddWARN_RATELIMIT
net: filter: UseWARN_RATELIMIT
Hi, this causes a build failure on PPC with minimalistic config (PS3) [1]:net/core/filter.c: In function 'sk_run_filter':net/core/filter.c:297: error: implicit declaration of function 'WARN_RATELIMIT'
net/core/filter.c should include linux/bug.h (or linux/kernel.h).
[1]
http://gitorious.org/opensuse/kernel-source/blobs/SLE11-SP1/config/ppc/ps3
regards,
Signature · 2 lines
js suse labs
Quoted 11 lines · Jiri Slaby
Quoted 3 lines · Greg KH
Joe Perches (2):
bug.h: AddWARN_RATELIMIT
net: filter: UseWARN_RATELIMITHi, this causes a build failure on PPC with minimalistic config (PS3) [1]:
net/core/filter.c: In function 'sk_run_filter':net/core/filter.c:297: error: implicit declaration of function 'WARN_RATELIMIT'
net/core/filter.cshould includelinux/bug.h(orlinux/kernel.h).
Ah, no, PS3 doesn't have CONFIG_BUG set.
Quoted 4 lines
[1]
http://gitorious.org/opensuse/kernel-source/blobs/SLE11-SP1/config/ppc/ps3regards,
Signature · 2 lines
js suse labs
Cced Joe.
Quoted 6 lines · Jiri Slaby
Quoted 5 lines · Jiri Slaby
Quoted 3 lines · Greg KH
Joe Perches (2):
bug.h: AddWARN_RATELIMIT
net: filter: UseWARN_RATELIMIT
Quoted 8 lines
Quoted 6 lines
Hi, this causes a build failure on PPC with minimalistic config (PS3) [1]:
net/core/filter.c: In function 'sk_run_filter':net/core/filter.c:297: error: implicit declaration of function 'WARN_RATELIMIT'
net/core/filter.cshould includelinux/bug.h(orlinux/kernel.h).Ah, no, PS3 doesn't have
CONFIG_BUGset.
A fix attached. Upstream doesn't need it. There it is all in linux/ratelimit.h
Quoted 4 lines
Quoted 4 lines
[1]
http://gitorious.org/opensuse/kernel-source/blobs/SLE11-SP1/config/ppc/ps3regards,
Signature · 2 lines
js suse labs
From: Jiri Slaby <[email protected]>
Subject: PPC: fix net core build
Patch-mainline: not yet
After "net: filter: Use WARN_RATELIMIT" was applied as a part of patches.kernel.org/patch-2.6.32.42-43 we are choking at:net/core/filter.c: In function 'sk_run_filter':net/core/filter.c:297: error: implicit declaration of function 'WARN_RATELIMIT' on configs without CONFIG_BUG.
--- include/asm-generic/bug.h | 7 +++++++ 1 file changed, 7 insertions(+)
include/asm-generic/bug.h +7 -0
@@ -126,6 +126,13 @@ extern void warn_slowpath_null(const cha })#endif +#ifndef WARN_RATELIMIT +#define WARN_RATELIMIT(condition, format...) ({ \ + int __ret_warn_on = !!(condition); \ + unlikely(__ret_warn_on); \ +}) +#endif +#endif #define WARN_ON_ONCE (condition) ({ \
Re: Linux 2.6.32.43 (WARN_RATELIMIT)
Quoted 1 line · Jiri Slaby
Cced Joe.
Thanks Jiri.
I didn't submit this patch for stable.
I don't even try to track stable.
Saidone also notified me, I just replied to him and cc'd stable. Perhaps I should have cc'd lkml as well. Saidone's proposed patch is attached.
cheers, Joe
Quoted 12 lines · Jiri Slaby
Quoted 11 lines · Jiri Slaby
Quoted 10 lines · Greg KH
Quoted 3 lines
Joe Perches (2):
bug.h: AddWARN_RATELIMIT
net: filter: UseWARN_RATELIMITHi, this causes a build failure on PPC with minimalistic config (PS3) [1]:
net/core/filter.c: In function 'sk_run_filter':net/core/filter.c:297: error: implicit declaration of function 'WARN_RATELIMIT'
Quoted 11 lines
Quoted 3 lines
Quoted 1 line
net/core/filter.cshould includelinux/bug.h(orlinux/kernel.h).Ah, no, PS3 doesn't have
CONFIG_BUGset.A fix attached. Upstream doesn't need it. There it is all in
linux/ratelimit.hQuoted 4 lines
Quoted 4 lines
[1]
http://gitorious.org/opensuse/kernel-source/blobs/SLE11-SP1/config/ppc/ps3regards,
Hi Joe, I found that the problem was that I have debugfs disabled (# CONFIG_BUG is not set). I cannot make better than this patch to net/core/filter.c:
#ifdef CONFIG_BUG
WARN_RATELIMIT(1, "Unknown code:%u jt:%u tf:%u
k:%u\n",
fentry->code, fentry->jt,
fentry->jf, fentry->k);
#endif
#ifndef CONFIG_BUG
WARN_ON(1);
#endif
return 0;However, at least, it works ;-)
Thank you very much for the hints,
Marco Marini
Quoted 14 lines · Joe Perches
Quoted 9 lines · saidone
Hello Joe,
I tried to build the latest stable kernel 2.6.32.43 with gcc 3.4.6, but it stopped while compilingfilter.c:net/core/filter.c: In function `sk_run_filter':net/core/filter.c:294: error: implicit declaration of function `WARN_RATELIMIT'
How can I patch it in a "safe" manner?
Thanks in advance,
Marco MariniI believe
net/core/filter.cwill need to#include<linux/ratelimit.h>