Linux 2.6.29.4
Subsystems (38)
I'm announcing the release of the 2.6.29.4 kernel. All users of the 2.6.29 kernel series are very strongly encouraged to upgrade.
I'll also be replying to this message with a copy of the patch between 2.6.29.3 and 2.6.29.4
The updated 2.6.29.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.29.y.git
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.29.y.git;a=summarythanks,
greg k-h
------------
Documentation/filesystems/Locking | 26 ++- Makefile | 2 arch/x86/kvm/svm.c | 1 arch/x86/kvm/x86.c | 4 drivers/dma/dmatest.c | 4 drivers/hid/hid-ids.h | 5 drivers/hid/usbhid/hid-quirks.c | 3 drivers/hwmon/w83781d.c | 3 drivers/i2c/algos/i2c-algo-bit.c | 2 drivers/i2c/algos/i2c-algo-pca.c | 11 + drivers/md/bitmap.c | 29 +-- drivers/md/md.c | 7 drivers/md/raid10.c | 12 - drivers/net/e1000/e1000_main.c | 2 drivers/net/ehea/ehea_main.c | 31 ++-- drivers/net/ne2k-pci.c | 7 drivers/serial/mpc52xx_uart.c | 2 drivers/usb/gadget/usbstring.c | 6 drivers/usb/serial/ftdi_sio.c | 18 +- drivers/video/fb_defio.c | 3 fs/btrfs/ctree.h | 2 fs/btrfs/inode.c | 12 + fs/buffer.c | 20 +- fs/cifs/cifs_unicode.h | 7 fs/cifs/cifssmb.c | 17 +- fs/cifs/connect.c | 6 fs/cifs/misc.c | 5 fs/cifs/readdir.c | 2 fs/cifs/sess.c | 46 +++--- fs/eventpoll.c | 2 fs/ext4/ext4.h | 2 fs/ext4/inode.c | 5 fs/fcntl.c | 6 fs/fuse/file.c | 3 fs/fuse/inode.c | 1 fs/gfs2/ops_file.c | 7 fs/ioctl.c | 75 +++++++-- fs/lockd/svc.c | 15 + fs/nfs/dir.c | 9 - fs/nfs/file.c | 9 - fs/nfsd/nfs4xdr.c | 16 +- fs/ocfs2/file.c | 94 +++++++++--- fs/ocfs2/mmap.c | 6 fs/splice.c | 274 ++++++++++++++++++++++-------------- fs/ubifs/file.c | 9 - fs/xfs/linux-2.6/xfs_file.c | 4 include/linux/buffer_head.h | 2 include/linux/compiler.h | 3 include/linux/mm.h | 3 include/linux/splice.h | 12 + include/net/cipso_ipv4.h | 17 ++ include/net/netlabel.h | 15 + mm/memory.c | 132 ++++++++++++----- net/ipv4/cipso_ipv4.c | 130 +++++++++++++++++ net/ipv4/syncookies.c | 9 - net/ipv4/tcp_ipv4.c | 7 net/netlabel/netlabel_kapi.c | 84 +++++++++++ security/selinux/hooks.c | 49 +----- security/selinux/include/netlabel.h | 23 +-- security/selinux/netlabel.c | 185 ++++++------------------ security/smack/smack.h | 1 security/smack/smack_lsm.c | 130 +++++++++-------- sound/pci/hda/patch_sigmatel.c | 7 sound/soc/codecs/wm8990.c | 40 ++--- 64 files changed, 1091 insertions(+), 590 deletions(-)
Alan Stern (3):
usb-serial: ftdi_sio: fix reference counting of ftdi_private
USB: Gadget: fix UTF conversion in the usbstring library
HID: add NOGET quirk for devices from CH Products
Avi Kivity (2):
KVM: SVM: Remove port 80 passthrough
KVM: Make EFER reads safe when EFER does not exist
Bart Van Assche (1):
Fix for enabling branch profiling makes sparse unusable
Dan Williams (1):
dmatest: fix max channels handling
Dave Airlie (1):
i2c-algo-bit: Fix timeout test
Davide Libenzi (1):
epoll: fix size check in epoll_create()
Enrik Berkhan (1):
i2c-algo-pca: Let PCA9564 recover from unacked data byte (state 0x30)
Grant Likely (1):
powerpc/5200: Don't specify IRQF_SHARED in PSC UART driver
Greg Kroah-Hartman (1):
Linux 2.6.29.4
Hannes Hering (1):
ehea: fix invalid pointer access
J. Bruce Fields (2):
nfsd4: check for negative dentry before use in nfsv4 readdir
lockd: fix list corruption on lockd restart
Jean Delvare (1):
hwmon: (w83781d) Fix W83782D support (NULL pointer dereference)
Jeff Layton (2):
cifs: Fix buffer size for tcon->nativeFileSystem field
cifs: Fix unicode string area word alignment in session setup
Jeff Mahoney (1):
dup2: Fix return value with oldfd == newfd and invalid fd
Jesse Brandeburg (1):
e1000: fix virtualization bug
Jinyoung Park (1):
ASoC: Fix errors in WM8990
Josef Bacik (1):
fiemap: fix problem with setting FIEMAP_EXTENT_LAST
Lubomir Rintel (1):
ne2k-pci: Do not register device until initialized.
Miklos Szeredi (5):
fuse: destroy bdi on error
splice: split up __splice_from_pipe()
splice: remove i_mutex locking in splice_from_pipe()
splice: fix i_mutex locking in generic_splice_write()
ocfs2: fix i_mutex locking in ocfs2_splice_to_file()
NeilBrown (4):
md: remove ability to explicit set an inactive array to 'clean'.
md: fix some (more) errors with bitmaps on devices larger than 2TB. md/raid10: don't clear bitmap during recovery if array will still be degraded.
md: fix loading of out-of-date bitmap.
Nick Piggin (3):
mm: page_mkwrite change prototype to match fault
fs: fix page_mkwrite error cases in core code and btrfs
mm: close page_mkwrite races
Paul Moore (7):
lsm: Relocate the IPv4 security_inet_conn_request() hooks
netlabel: Add CIPSO {set, del}attr request_sock functions
netlabel: Add new NetLabel KAPI interfaces for request_sock security attributes
selinux: Add new NetLabel glue code to handle labeling of connection requests
selinux: Set the proper NetLabel security attributes for connection requests
selinux: Remove dead code labeled networking code
smack: Set the proper NetLabel security attributes for connection requests
Steve French (1):
CIFS: Fix endian conversion of vcnum field
Steven Whitehouse (1):
GFS2: Fix page_mkwrite() return code
Suresh Jayaraman (3):
cifs: Increase size of tmp_buf in cifs_readdir to avoid potential overflows
cifs: Fix incorrect destination buffer size in cifs_strncpy_to_host
cifs: Fix buffer size in cifs_convertUCSpath
Takashi Iwai (1):
ALSA: hda - Fix line-in on Mac Mini Core2 Duo
Trond Myklebust (3):
NFS: Fix the return value in nfs_page_mkwrite()
NFS: Close page_mkwrite() races
NFS: Fix the notifications when renaming onto an existing file
Documentation/filesystems/Locking +17 -9
@@ -502,23 +502,31 @@ prototypes: void (*open)(struct vm_area_struct*); void (*close)(struct vm_area_struct*); int (*fault)(struct vm_area_struct*, struct vm_fault *); - int (*page_mkwrite)(struct vm_area_struct *, struct page *); + int (*page_mkwrite)(struct vm_area_struct *, struct vm_fault *); int (*access)(struct vm_area_struct *, unsigned long, void*, int, int); locking rules: BKL mmap_sem PageLocked(page) open: no yes close: no yes -fault: no yes -page_mkwrite: no yes no +fault: no yes can return with page locked +page_mkwrite: no yes can return with page locked access: no yes - ->page_mkwrite() is called when a previously read-only page is -about to become writeable. The file system is responsible for -protecting against truncate races. Once appropriate action has been -taking to lock out truncate, the page range should be verified to be -within i_size. The page mapping should also be checked that it is not -NULL. + ->fault() is called when a previously not present pte is about +to be faulted in. The filesystem must find and return the page associated +with the passed in "pgoff" in the vm_fault structure. If it is possible that +the page may be truncated and/or invalidated, then the filesystem must lock +the page, then ensure it is not already truncated (the page lock will block +subsequent truncate), and then return with VM_FAULT_LOCKED, and the page +locked. The VM will unlock the page. + + ->page_mkwrite() is called when a previously read-only pte is +about to become writeable. The filesystem again must ensure that there are +no truncate/invalidate races, and then return with the page locked. If +the page has been truncated, the filesystem should not look up a new page +like the ->fault() handler, but simply return with VM_FAULT_NOPAGE, which +will cause the VM to retry the fault. ->access() is called when get_user_pages() fails in acces_process_vm(), typically used to debug a process through
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 29 -EXTRAVERSION = .3 +EXTRAVERSION = .4 NAME = Temporary Tasmanian Devil # *DOCUMENTATION*
arch/x86/kvm/svm.c +0 -1
@@ -411,7 +411,6 @@ static __init int svm_hardware_setup(void) iopm_va =page_address (iopm_pages);memset (iopm_va,0xff ,PAGE_SIZE * (1 <<IOPM_ALLOC_ORDER )); -clear_bit (0x80 , iopm_va);/* allow direct access to PC debug port */ iopm_base =page_to_pfn (iopm_pages) <<PAGE_SHIFT ;if (boot_cpu_has (X86_FEATURE_NX ))
arch/x86/kvm/x86.c +2 -2
@@ -1075,9 +1075,9 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)static int is_efer_nx (void ) { -u64 efer; +unsigned long long efer =0 ; -rdmsrl (MSR_EFER , efer); +rdmsrl_safe (MSR_EFER , &efer);return efer &EFER_NX ; }
drivers/dma/dmatest.c +1 -3
@@ -410,9 +410,7 @@ static int __init dmatest_init(void) chan =dma_request_channel (mask, filter,NULL );if (chan) { err =dmatest_add_channel (chan); -if (err ==0 ) -continue ; -else { +if (err) {dma_release_channel (chan);break ;/* add_channel failed, punt */ }
drivers/hid/hid-ids.h +5 -0
@@ -110,6 +110,11 @@#define USB_VENDOR_ID_BERKSHIRE 0x0c98#define USB_DEVICE_ID_BERKSHIRE_PCWD 0x1140 +#define USB_VENDOR_ID_CH 0x068e +#define USB_DEVICE_ID_CH_PRO_PEDALS 0x00f2 +#define USB_DEVICE_ID_CH_COMBATSTICK 0x00f4 +#define USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE 0x00ff +#define USB_VENDOR_ID_CHERRY 0x046a#define USB_DEVICE_ID_CHERRY_CYMOTION 0x0023
drivers/hid/usbhid/hid-quirks.c +3 -0
@@ -50,6 +50,9 @@ static const struct hid_blacklist { { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM, HID_QUIRK_NOGET }, { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVM, HID_QUIRK_NOGET }, { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVMC, HID_QUIRK_NOGET }, + { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_COMBATSTICK, HID_QUIRK_NOGET }, + { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE, HID_QUIRK_NOGET }, + { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_PRO_PEDALS, HID_QUIRK_NOGET }, { USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET }, { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET }, { USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE, HID_QUIRK_NOGET },
drivers/hwmon/w83781d.c +2 -1
@@ -1462,7 +1462,8 @@ static struct w83781d_data *w83781d_update_device(struct device *dev) data->pwm[i] =w83781d_read_value (data,W83781D_REG_PWM [i]); -if ((data->type != w83782d || !client->driver) +/* Only W83782D on SMBus has PWM3 and PWM4 */ +if ((data->type != w83782d || !client) && i ==1 )break ; }
drivers/i2c/algos/i2c-algo-bit.c +1 -1
@@ -104,7 +104,7 @@ static int sclhi(struct i2c_algo_bit_data *adap)* chips may hold it low ("clock stretching") while they * are processing data internally. */ -if (time_after_eq (jiffies, start + adap->timeout)) +if (time_after (jiffies, start + adap->timeout))return -ETIMEDOUT ;cond_resched (); }
drivers/i2c/algos/i2c-algo-pca.c +11 -0
@@ -270,10 +270,21 @@ static int pca_xfer(struct i2c_adapter *i2c_adap,case 0x30 :/* Data byte in I2CDAT has been transmitted; NOT ACK has been received */ DEB2 ("NOT ACK received after data byte\n" ); +pca_stop (adap); goto out;case 0x38 :/* Arbitration lost during SLA+W, SLA+R or data bytes */ DEB2 ("Arbitration lost\n" ); +/* +* The PCA9564 data sheet (2006-09-01) says "A +* START condition will be transmitted when the +* bus becomes free (STOP or SCL and SDA high)" +* when the STA bit is set (p. 11). +* +* In case this won't work, try pca_reset() +* instead. +*/ +pca_start (adap); goto out;case 0x58 :/* Data byte has been received; NOT ACK has been returned */
drivers/md/bitmap.c +15 -14
@@ -985,6 +985,9 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start) oldindex = index; oldpage = page; + bitmap->filemap[bitmap->file_pages++] = page; + bitmap->last_page_size = count; +if (outofdate) {/* * if bitmap is out of date, dirty the
@@ -997,15 +1000,9 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start)write_page (bitmap, page,1 ); ret = -EIO ; -if (bitmap->flags &BITMAP_WRITE_ERROR ) { -/* release, page not in filemap yet */ -put_page (page); +if (bitmap->flags &BITMAP_WRITE_ERROR ) goto err; - } } - - bitmap->filemap[bitmap->file_pages++] = page; - bitmap->last_page_size = count; } paddr =kmap_atomic (page,KM_USER0 );if (bitmap->flags &BITMAP_HOSTENDIAN )
@@ -1015,9 +1012,11 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start)kunmap_atomic (paddr,KM_USER0 );if (b) {/* if the disk bit is set, set the memory bit */ -bitmap_set_memory_bits (bitmap, i <<CHUNK_BLOCK_SHIFT (bitmap), - ((i+1 ) << (CHUNK_BLOCK_SHIFT (bitmap)) >= start) - ); +int needed = ((sector_t)(i+1 ) << (CHUNK_BLOCK_SHIFT (bitmap)) + >= start); +bitmap_set_memory_bits (bitmap, + (sector_t )i <<CHUNK_BLOCK_SHIFT (bitmap), + needed); bit_cnt++;set_page_attr (bitmap, page,BITMAP_PAGE_CLEAN ); }
@@ -1153,8 +1152,9 @@ void bitmap_daemon_work(struct bitmap *bitmap)spin_lock_irqsave (&bitmap->lock, flags);clear_page_attr (bitmap, page,BITMAP_PAGE_CLEAN ); } - bmc =bitmap_get_counter (bitmap, j <<CHUNK_BLOCK_SHIFT (bitmap), - &blocks,0 ); + bmc =bitmap_get_counter (bitmap, + (sector_t )j <<CHUNK_BLOCK_SHIFT (bitmap), + &blocks,0 );if (bmc) {/* if (j < 100) printk("bitmap: j=%lu, *bmc = 0x%x\n", j, *bmc);
@@ -1168,7 +1168,8 @@ void bitmap_daemon_work(struct bitmap *bitmap) }else if (*bmc ==1 ) {/* we can clear the bit */ *bmc =0 ; -bitmap_count_page (bitmap, j <<CHUNK_BLOCK_SHIFT (bitmap), +bitmap_count_page (bitmap, + (sector_t )j <<CHUNK_BLOCK_SHIFT (bitmap),-1 );/* clear the bit */
@@ -1484,7 +1485,7 @@ void bitmap_dirty_bits(struct bitmap *bitmap, unsigned long s, unsigned long e)unsigned long chunk;for (chunk = s; chunk <= e; chunk++) { -sector_t sec = chunk <<CHUNK_BLOCK_SHIFT (bitmap); +sector_t sec = (sector_t )chunk <<CHUNK_BLOCK_SHIFT (bitmap);bitmap_set_memory_bits (bitmap, sec,1 );bitmap_file_set_bit (bitmap, sec); }
drivers/md/md.c +2 -5
@@ -2844,11 +2844,8 @@ array_state_store(mddev_t *mddev, const char *buf, size_t len) }else err = -EBUSY ;spin_unlock_irq (&mddev->write_lock); - }else { - mddev->ro =0 ; - mddev->recovery_cp = MaxSector; - err =do_md_run (mddev); - } + }else + err = -EINVAL ;break ;case active:if (mddev->pers) {
drivers/md/raid10.c +6 -6
@@ -1807,17 +1807,17 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i r10_bio->sector = sect;raid10_find_phys (conf, r10_bio); -/* Need to check if this section will still be + +/* Need to check if the array will still be * degraded */ -for (j=0 ; j<conf->copies;j++) { -int d = r10_bio->devs[j].devnum; -if (conf->mirrors[d].rdev ==NULL || -test_bit (Faulty, &conf->mirrors[d].rdev->flags)) { +for (j=0 ; j<conf->raid_disks; j++) +if (conf->mirrors[j].rdev ==NULL || +test_bit (Faulty, &conf->mirrors[j].rdev->flags)) { still_degraded =1 ;break ; } - } + must_sync =bitmap_start_sync (mddev->bitmap, sect, &sync_blocks, still_degraded);
drivers/net/e1000/e1000_main.c +1 -1
@@ -3712,7 +3712,7 @@ static irqreturn_t e1000_intr(int irq, void *data)struct e1000_hw *hw = &adapter->hw;u32 rctl, icr =er32 (ICR ); -if (unlikely ((!icr) ||test_bit (__E1000_RESETTING, &adapter->flags))) +if (unlikely ((!icr) ||test_bit (__E1000_DOWN, &adapter->flags)))return IRQ_NONE ;/* Not our interrupt */ /* IMS will not auto-mask if INT_ASSERTED is not set, and if it is
drivers/net/ehea/ehea_main.c +18 -13
@@ -529,14 +529,17 @@ static inline struct sk_buff *get_skb_by_index(struct sk_buff **skb_array, x &= (arr_len -1 ); pref = skb_array[x]; -prefetchw (pref); -prefetchw (pref +EHEA_CACHE_LINE ); - - pref = (skb_array[x]->data); -prefetch (pref); -prefetch (pref +EHEA_CACHE_LINE ); -prefetch (pref +EHEA_CACHE_LINE *2 ); -prefetch (pref +EHEA_CACHE_LINE *3 ); +if (pref) { +prefetchw (pref); +prefetchw (pref +EHEA_CACHE_LINE ); + + pref = (skb_array[x]->data); +prefetch (pref); +prefetch (pref +EHEA_CACHE_LINE ); +prefetch (pref +EHEA_CACHE_LINE *2 ); +prefetch (pref +EHEA_CACHE_LINE *3 ); + } + skb = skb_array[skb_index]; skb_array[skb_index] =NULL ;return skb;
@@ -553,12 +556,14 @@ static inline struct sk_buff *get_skb_by_index_ll(struct sk_buff **skb_array, x &= (arr_len -1 ); pref = skb_array[x]; -prefetchw (pref); -prefetchw (pref +EHEA_CACHE_LINE ); +if (pref) { +prefetchw (pref); +prefetchw (pref +EHEA_CACHE_LINE ); - pref = (skb_array[x]->data); -prefetchw (pref); -prefetchw (pref +EHEA_CACHE_LINE ); + pref = (skb_array[x]->data); +prefetchw (pref); +prefetchw (pref +EHEA_CACHE_LINE ); + } skb = skb_array[wqe_index]; skb_array[wqe_index] =NULL ;
drivers/net/ne2k-pci.c +3 -4
@@ -373,18 +373,17 @@ static int __devinit ne2k_pci_init_one (struct pci_dev *pdev, dev->ethtool_ops = &ne2k_pci_ethtool_ops;NS8390_init (dev,0 ); +memcpy (dev->dev_addr, SA_prom,6 ); +memcpy (dev->perm_addr, dev->dev_addr, dev->addr_len); + i =register_netdev (dev);if (i) goto err_out_free_netdev; -for (i =0 ; i <6 ; i++) - dev->dev_addr[i] = SA_prom[i];printk ("%s: %s found at %#lx, IRQ %d, %pM.\n" , dev->name, pci_clone_list[chip_idx].name, ioaddr, dev->irq, dev->dev_addr); -memcpy (dev->perm_addr, dev->dev_addr, dev->addr_len); -return 0 ; err_out_free_netdev:
drivers/serial/mpc52xx_uart.c +1 -1
@@ -522,7 +522,7 @@ mpc52xx_uart_startup(struct uart_port *port)/* Request IRQ */ ret =request_irq (port->irq, mpc52xx_uart_int, -IRQF_DISABLED |IRQF_SAMPLE_RANDOM |IRQF_SHARED , +IRQF_DISABLED |IRQF_SAMPLE_RANDOM ,"mpc52xx_psc_uart" , port);if (ret)return ret;
drivers/usb/gadget/usbstring.c +3 -3
@@ -38,7 +38,7 @@ static int utf8_to_utf16le(const char *s, __le16 *cp, unsigned len) uchar = (c &0x1f ) <<6 ; c = (u8) *s++; -if ((c &0xc0 ) !=0xc0 ) +if ((c &0xc0 ) !=0x80 ) goto fail; c &=0x3f ; uchar |= c;
@@ -49,13 +49,13 @@ static int utf8_to_utf16le(const char *s, __le16 *cp, unsigned len) uchar = (c &0x0f ) <<12 ; c = (u8) *s++; -if ((c &0xc0 ) !=0xc0 ) +if ((c &0xc0 ) !=0x80 ) goto fail; c &=0x3f ; uchar |= c <<6 ; c = (u8) *s++; -if ((c &0xc0 ) !=0xc0 ) +if ((c &0xc0 ) !=0x80 ) goto fail; c &=0x3f ; uchar |= c;
drivers/usb/serial/ftdi_sio.c +14 -4
@@ -56,6 +56,7 @@ static __u16 vendor = FTDI_VID;static __u16 product;struct ftdi_private { +struct kref kref;ftdi_chip_type_t chip_type;/* type of device, either SIO or FT8U232AM */ int baud_base;/* baud base clock for divisor setting */
@@ -1352,6 +1353,7 @@ static int ftdi_sio_port_probe(struct usb_serial_port *port)return -ENOMEM ; } +kref_init (&priv->kref);spin_lock_init (&priv->rx_lock);spin_lock_init (&priv->tx_lock);init_waitqueue_head (&priv->delta_msr_wait);
@@ -1468,6 +1470,13 @@ static void ftdi_shutdown(struct usb_serial *serial)dbg ("%s" , __func__); } +static void ftdi_sio_priv_release (struct kref *k) +{ + struct ftdi_private *priv = container_of(k, struct ftdi_private, kref); + +kfree (priv); +} +static int ftdi_sio_port_remove (struct usb_serial_port *port) {struct ftdi_private *priv =usb_get_serial_port_data (port);
@@ -1482,7 +1491,7 @@ static int ftdi_sio_port_remove(struct usb_serial_port *port)if (priv) {usb_set_serial_port_data (port,NULL ); -kfree (priv); +kref_put (&priv->kref, ftdi_sio_priv_release); }return 0 ;
@@ -1547,7 +1556,8 @@ static int ftdi_open(struct tty_struct *tty,dev_err (&port->dev,"%s - failed submitting read urb, error %d\n" , __func__, result); - + else + kref_get(&priv->kref);return result; }/* ftdi_open */
@@ -1589,11 +1599,11 @@ static void ftdi_close(struct tty_struct *tty,mutex_unlock (&port->serial->disc_mutex);/* cancel any scheduled reading */ -cancel_delayed_work (&priv->rx_work); -flush_scheduled_work (); +cancel_delayed_work_sync (&priv->rx_work);/* shutdown our bulk read */ usb_kill_urb (port->read_urb); +kref_put (&priv->kref, ftdi_sio_priv_release); }/* ftdi_close */
drivers/video/fb_defio.c +2 -1
@@ -85,8 +85,9 @@ EXPORT_SYMBOL_GPL(fb_deferred_io_fsync);/* vm_ops->page_mkwrite handler */ static int fb_deferred_io_mkwrite (struct vm_area_struct *vma, -struct page *page) +struct vm_fault *vmf) { +struct page *page = vmf->page;struct fb_info *info = vma->vm_private_data;struct fb_deferred_io *fbdefio = info->fbdefio;struct page *cur;
fs/btrfs/ctree.h +1 -1
@@ -2060,7 +2060,7 @@ int btrfs_merge_bio_hook(struct page *page, unsigned long offset,unsigned long btrfs_force_ra (struct address_space *mapping,struct file_ra_state *ra,struct file *file,pgoff_t offset,pgoff_t last_index); -int btrfs_page_mkwrite (struct vm_area_struct *vma,struct page *page); +int btrfs_page_mkwrite (struct vm_area_struct *vma,struct vm_fault *vmf);int btrfs_readpage (struct file *file,struct page *page);void btrfs_delete_inode (struct inode *inode);void btrfs_put_inode (struct inode *inode);
fs/btrfs/inode.c +9 -3
@@ -4292,8 +4292,9 @@ static void btrfs_invalidatepage(struct page *page, unsigned long offset)* beyond EOF, then the page is guaranteed safe against truncation until we * unlock the page. */ -int btrfs_page_mkwrite (struct vm_area_struct *vma,struct page *page) +int btrfs_page_mkwrite (struct vm_area_struct *vma,struct vm_fault *vmf) { +struct page *page = vmf->page;struct inode *inode =fdentry (vma->vm_file)->d_inode;struct btrfs_root *root =BTRFS_I (inode)->root;struct extent_io_tree *io_tree = &BTRFS_I (inode)->io_tree;
@@ -4306,10 +4307,15 @@ int btrfs_page_mkwrite(struct vm_area_struct *vma, struct page *page)u64 page_end; ret =btrfs_check_data_free_space (root, inode,PAGE_CACHE_SIZE ); -if (ret) +if (ret) { +if (ret == -ENOMEM ) + ret =VM_FAULT_OOM ; +else /* -ENOSPC, -EIO, etc */ + ret =VM_FAULT_SIGBUS ; goto out; + } - ret = -EINVAL ; + ret =VM_FAULT_NOPAGE ;/* make the VM retry the fault */ again:lock_page (page); size =i_size_read (inode);
fs/buffer.c +15 -5
@@ -2465,20 +2465,22 @@ int block_commit_write(struct page *page, unsigned from, unsigned to)* unlock the page. */ int -block_page_mkwrite (struct vm_area_struct *vma,struct page *page, +block_page_mkwrite (struct vm_area_struct *vma,struct vm_fault *vmf,get_block_t get_block) { +struct page *page = vmf->page;struct inode *inode = vma->vm_file->f_path.dentry->d_inode;unsigned long end;loff_t size; -int ret = -EINVAL ; +int ret =VM_FAULT_NOPAGE ;/* make the VM retry the fault */ lock_page (page); size =i_size_read (inode);if ((page->mapping != inode->i_mapping) || (page_offset (page) > size)) {/* page got truncated out from underneath us */ - goto out_unlock; +unlock_page (page); + goto out; }/* page is wholly or partially inside EOF */
@@ -2491,8 +2493,16 @@ block_page_mkwrite(struct vm_area_struct *vma, struct page *page,if (!ret) ret =block_commit_write (page,0 , end); -out_unlock: -unlock_page (page); +if (unlikely (ret)) { +unlock_page (page); +if (ret == -ENOMEM ) + ret =VM_FAULT_OOM ; +else /* -ENOSPC, -EIO, etc */ + ret =VM_FAULT_SIGBUS ; + }else + ret =VM_FAULT_LOCKED ; + +out:return ret; }
fs/cifs/cifs_unicode.h +7 -0
@@ -64,6 +64,13 @@ int cifs_strtoUCS(__le16 *, const char *, int, const struct nls_table *);#endif /* +* To be safe - for UCS to UTF-8 with strings loaded with the rare long +* characters alloc more to account for such multibyte target UTF-8 +* characters. +*/ +#define UNICODE_NAME_MAX ((4 * NAME_MAX) + 2) + +/* * UniStrcat: Concatenate the second string to the first * * Returns:
fs/cifs/cifssmb.c +8 -9
@@ -91,23 +91,22 @@ static int cifs_strncpy_to_host(char **dst, const char *src, const int maxlen, const bool is_unicode, const struct nls_table *nls_codepage) { -int plen; +int src_len, dst_len;if (is_unicode) { - plen =UniStrnlen ((wchar_t *)src, maxlen); - *dst =kmalloc (plen +2 ,GFP_KERNEL ); + src_len =UniStrnlen ((wchar_t *)src, maxlen); + *dst =kmalloc ((4 * src_len) +2 ,GFP_KERNEL );if (!*dst) goto cifs_strncpy_to_host_ErrExit; -cifs_strfromUCS_le (*dst, (__le16 *)src, plen, nls_codepage); + dst_len =cifs_strfromUCS_le (*dst, (__le16 *)src, src_len, nls_codepage); + (*dst)[dst_len +1 ] =0 ; }else { - plen =strnlen (src, maxlen); - *dst =kmalloc (plen +2 ,GFP_KERNEL ); + src_len =strnlen (src, maxlen); + *dst =kmalloc (src_len +1 ,GFP_KERNEL );if (!*dst) goto cifs_strncpy_to_host_ErrExit; -strncpy (*dst, src, plen); +strlcpy (*dst, src, src_len +1 ); } - (*dst)[plen] =0 ; - (*dst)[plen+1 ] =0 ;/* harmless for ASCII case, needed for Unicode */ return 0 ; cifs_strncpy_to_host_ErrExit:
fs/cifs/connect.c +1 -5
@@ -3667,16 +3667,12 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, BCC(smb_buffer_response)) {kfree (tcon->nativeFileSystem); tcon->nativeFileSystem = -kzalloc (2 *(length +1 ),GFP_KERNEL ); +kzalloc ((4 * length) +2 ,GFP_KERNEL );if (tcon->nativeFileSystem)cifs_strfromUCS_le ( tcon->nativeFileSystem, (__le16 *) bcc_ptr, length, nls_codepage); - bcc_ptr +=2 * length; - bcc_ptr[0 ] =0 ;/* null terminate the string */ - bcc_ptr[1 ] =0 ; - bcc_ptr +=2 ; }/* else do not bother copying these information fields*/ }else {
fs/cifs/misc.c +3 -2
@@ -691,14 +691,15 @@ cifs_convertUCSpath(char *target, const __le16 *source, int maxlen, NLS_MAX_CHARSET_SIZE);if (len >0 ) { j += len; -continue ; + goto overrun_chk; }else { target[j] ='?' ; } } j++;/* make sure we do not overrun callers allocated temp buffer */ -if (j >= (2 *NAME_MAX )) +overrun_chk: +if (j >=UNICODE_NAME_MAX )break ; } cUCS_out:
fs/cifs/readdir.c +1 -1
@@ -1072,7 +1072,7 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)with the rare long characters alloc more to account for such multibyte target UTF-8 characters. cifs_unicode.c, which actually does the conversion, has the same limit */ - tmp_buf =kmalloc ((2 *NAME_MAX ) +4 ,GFP_KERNEL ); + tmp_buf =kmalloc (UNICODE_NAME_MAX ,GFP_KERNEL );for (i =0 ; (i < num_to_fill) && (rc ==0 ); i++) {if (current_entry ==NULL ) {/* evaluate whether this case is an error */
fs/cifs/sess.c +24 -22
83 lines not on this page · raw message
fs/eventpoll.c +1 -1
@@ -1136,7 +1136,7 @@ error_return: SYSCALL_DEFINE1(epoll_create, int, size) { -if (size <0 ) +if (size <=0 )return -EINVAL ;return sys_epoll_create1 (0 );
fs/ext4/ext4.h +1 -1
@@ -1097,7 +1097,7 @@ extern int ext4_meta_trans_blocks(struct inode *, int nrblocks, int idxblocks);extern int ext4_chunk_trans_blocks (struct inode *,int nrblocks);extern int ext4_block_truncate_page (handle_t *handle,struct address_space *mapping,loff_t from); -extern int ext4_page_mkwrite (struct vm_area_struct *vma,struct page *page); +extern int ext4_page_mkwrite (struct vm_area_struct *vma,struct vm_fault *vmf);/* ioctl.c */ extern long ext4_ioctl (struct file *,unsigned int ,unsigned long );
fs/ext4/inode.c +4 -1
@@ -5116,8 +5116,9 @@ static int ext4_bh_unmapped(handle_t *handle, struct buffer_head *bh)return !buffer_mapped (bh); } -int ext4_page_mkwrite (struct vm_area_struct *vma,struct page *page) +int ext4_page_mkwrite (struct vm_area_struct *vma,struct vm_fault *vmf) { +struct page *page = vmf->page;loff_t size;unsigned long len;int ret = -EINVAL ;
@@ -5169,6 +5170,8 @@ int ext4_page_mkwrite(struct vm_area_struct *vma, struct page *page) goto out_unlock; ret =0 ; out_unlock: +if (ret) + ret =VM_FAULT_SIGBUS ;up_read (&inode->i_alloc_sem);return ret; }
fs/fcntl.c +4 -2
@@ -117,11 +117,13 @@ SYSCALL_DEFINE2(dup2, unsigned int, oldfd, unsigned int, newfd) {if (unlikely (newfd == oldfd)) {/* corner case */ struct files_struct *files = current->files; +int retval = oldfd; +rcu_read_lock ();if (!fcheck_files (files, oldfd)) - oldfd = -EBADF ; + retval = -EBADF ;rcu_read_unlock (); -return oldfd; +return retval; }return sys_dup3 (oldfd, newfd,0 ); }
fs/fuse/file.c +2 -1
@@ -1234,8 +1234,9 @@ static void fuse_vma_close(struct vm_area_struct *vma)* - sync(2) * - try_to_free_pages() with order > PAGE_ALLOC_COSTLY_ORDER */ -static int fuse_page_mkwrite (struct vm_area_struct *vma,struct page *page) +static int fuse_page_mkwrite (struct vm_area_struct *vma,struct vm_fault *vmf) { +struct page *page = vmf->page;/* * Don't use page->mapping as it may become NULL from a * concurrent truncate.
fs/fuse/inode.c +1 -0
@@ -908,6 +908,7 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent) err_put_root:dput (root_dentry); err_put_conn: +bdi_destroy (&fc->bdi);fuse_conn_put (fc); err_fput:fput (file);
fs/gfs2/ops_file.c +6 -1
@@ -336,8 +336,9 @@ static int gfs2_allocate_page_backing(struct page *page)* blocks allocated on disk to back that page. */ -static int gfs2_page_mkwrite (struct vm_area_struct *vma,struct page *page) +static int gfs2_page_mkwrite (struct vm_area_struct *vma,struct vm_fault *vmf) { +struct page *page = vmf->page;struct inode *inode = vma->vm_file->f_path.dentry->d_inode;struct gfs2_inode *ip =GFS2_I (inode);struct gfs2_sbd *sdp =GFS2_SB (inode);
@@ -409,6 +410,10 @@ out_unlock:gfs2_glock_dq (&gh); out:gfs2_holder_uninit (&gh); +if (ret == -ENOMEM ) + ret =VM_FAULT_OOM ; +else if (ret) + ret =VM_FAULT_SIGBUS ;return ret; }
fs/ioctl.c +55 -20
113 lines not on this page · raw message
fs/lockd/svc.c +11 -4
@@ -115,6 +115,16 @@ static void set_grace_period(void)schedule_delayed_work (&grace_period_end, grace_period); } +static void restart_grace (void ) +{ +if (nlmsvc_ops) { +cancel_delayed_work_sync (&grace_period_end); +locks_end_grace (&lockd_manager); +nlmsvc_invalidate_all (); +set_grace_period (); + } +} +/* * This is the lockd kernel thread */
@@ -160,10 +170,7 @@ lockd(void *vrqstp)if (signalled ()) {flush_signals (current); -if (nlmsvc_ops) { -nlmsvc_invalidate_all (); -set_grace_period (); - } +restart_grace ();continue ; }
fs/nfs/dir.c +4 -5
@@ -1624,8 +1624,7 @@ static int nfs_rename(struct inode *old_dir, struct dentry *old_dentry, }else if (atomic_read (&new_dentry->d_count) >1 )/* dentry still busy? */ goto out; - }else -nfs_drop_nlink (new_inode); + } go_ahead:/*
@@ -1638,10 +1637,8 @@ go_ahead: }nfs_inode_return_delegation (old_inode); -if (new_inode !=NULL ) { +if (new_inode !=NULL )nfs_inode_return_delegation (new_inode); -d_delete (new_dentry); - } error =NFS_PROTO (old_dir)->rename (old_dir, &old_dentry->d_name, new_dir, &new_dentry->d_name);
@@ -1650,6 +1647,8 @@ out:if (rehash)d_rehash (rehash);if (!error) { +if (new_inode !=NULL ) +nfs_drop_nlink (new_inode);d_move (old_dentry, new_dentry);nfs_set_verifier (new_dentry,nfs_save_change_attribute (new_dir));
fs/nfs/file.c +5 -4
@@ -451,8 +451,9 @@ const struct address_space_operations nfs_file_aops = { .launder_page = nfs_launder_page, }; -static int nfs_vm_page_mkwrite (struct vm_area_struct *vma,struct page *page) +static int nfs_vm_page_mkwrite (struct vm_area_struct *vma,struct vm_fault *vmf) { +struct page *page = vmf->page;struct file *filp = vma->vm_file;struct dentry *dentry = filp->f_path.dentry;unsigned pagelen;
@@ -479,11 +480,11 @@ static int nfs_vm_page_mkwrite(struct vm_area_struct *vma, struct page *page) goto out_unlock; ret =nfs_updatepage (filp, page,0 , pagelen); -if (ret ==0 ) - ret = pagelen; out_unlock: +if (!ret) +return VM_FAULT_LOCKED ;unlock_page (page); -return ret; +return VM_FAULT_SIGBUS ; }static struct vm_operations_struct nfs_file_vm_ops = {
fs/nfsd/nfs4xdr.c +15 -1
@@ -1843,6 +1843,15 @@ nfsd4_encode_dirent_fattr(struct nfsd4_readdir *cd, dentry =lookup_one_len (name, cd->rd_fhp->fh_dentry, namlen);if (IS_ERR (dentry))return nfserrno (PTR_ERR (dentry)); +if (!dentry->d_inode) { +/* +* nfsd_buffered_readdir drops the i_mutex between +* readdir and calling this callback, leaving a window +* where this directory entry could have gone away. +*/ +dput (dentry); +return nfserr_noent; + }exp_get (exp);/*
@@ -1905,6 +1914,7 @@ nfsd4_encode_dirent(void *ccdv, const char *name, int namlen, struct nfsd4_readdir *cd = container_of(ccd, struct nfsd4_readdir, common);int buflen;__be32 *p = cd->buffer; +__be32 *cookiep;__be32 nfserr = nfserr_toosmall;/* In nfsv4, "." and ".." never make it onto the wire.. */
@@ -1921,7 +1931,7 @@ nfsd4_encode_dirent(void *ccdv, const char *name, int namlen, goto fail; *p++ = xdr_one;/* mark entry present */ - cd->offset = p;/* remember pointer */ + cookiep = p; p =xdr_encode_hyper (p,NFS_OFFSET_MAX );/* offset of next entry */ p =xdr_encode_array (p, name, namlen);/* name length & name */
@@ -1935,6 +1945,8 @@ nfsd4_encode_dirent(void *ccdv, const char *name, int namlen, goto fail;case nfserr_dropit: goto fail; +case nfserr_noent: + goto skip_entry;default :/* * If the client requested the RDATTR_ERROR attribute,
@@ -1953,6 +1965,8 @@ nfsd4_encode_dirent(void *ccdv, const char *name, int namlen, } cd->buflen -= (p - cd->buffer); cd->buffer = p; + cd->offset = cookiep; +skip_entry: cd->common.err = nfs_ok;return 0 ; fail:
fs/ocfs2/file.c +74 -20
118 lines not on this page · raw message
fs/ocfs2/mmap.c +4 -2
@@ -154,8 +154,9 @@ out:return ret; } -static int ocfs2_page_mkwrite (struct vm_area_struct *vma,struct page *page) +static int ocfs2_page_mkwrite (struct vm_area_struct *vma,struct vm_fault *vmf) { +struct page *page = vmf->page;struct inode *inode = vma->vm_file->f_path.dentry->d_inode;struct buffer_head *di_bh =NULL ;sigset_t blocked, oldset;
@@ -196,7 +197,8 @@ out: ret2 =ocfs2_vm_op_unblock_sigs (&oldset);if (ret2 <0 )mlog_errno (ret2); - +if (ret) + ret =VM_FAULT_SIGBUS ;return ret; }
fs/splice.c +171 -103
342 lines not on this page · raw message
fs/ubifs/file.c +6 -3
@@ -1434,8 +1434,9 @@ static int ubifs_releasepage(struct page *page, gfp_t unused_gfp_flags)* mmap()d file has taken write protection fault and is being made * writable. UBIFS must ensure page is budgeted for. */ -static int ubifs_vm_page_mkwrite (struct vm_area_struct *vma,struct page *page) +static int ubifs_vm_page_mkwrite (struct vm_area_struct *vma,struct vm_fault *vmf) { +struct page *page = vmf->page;struct inode *inode = vma->vm_file->f_path.dentry->d_inode;struct ubifs_info *c = inode->i_sb->s_fs_info;struct timespec now =ubifs_current_time (inode);
@@ -1447,7 +1448,7 @@ static int ubifs_vm_page_mkwrite(struct vm_area_struct *vma, struct page *page)ubifs_assert (!(inode->i_sb->s_flags &MS_RDONLY ));if (unlikely (c->ro_media)) -return -EROFS ; +return VM_FAULT_SIGBUS ;/* -EROFS */ /* * We have not locked @page so far so we may budget for changing the
@@ -1480,7 +1481,7 @@ static int ubifs_vm_page_mkwrite(struct vm_area_struct *vma, struct page *page)if (err == -ENOSPC )ubifs_warn ("out of space for mmapped file " "(inode number %lu)" , inode->i_ino); -return err; +return VM_FAULT_SIGBUS ; }lock_page (page);
@@ -1520,6 +1521,8 @@ static int ubifs_vm_page_mkwrite(struct vm_area_struct *vma, struct page *page) out_unlock:unlock_page (page);ubifs_release_budget (c, &req); +if (err) + err =VM_FAULT_SIGBUS ;return err; }
fs/xfs/linux-2.6/xfs_file.c +2 -2
@@ -234,9 +234,9 @@ xfs_file_mmap( STATIC intxfs_vm_page_mkwrite (struct vm_area_struct *vma, -struct page *page) +struct vm_fault *vmf) { -return block_page_mkwrite (vma, page, xfs_get_blocks); +return block_page_mkwrite (vma, vmf, xfs_get_blocks); }const struct file_operations xfs_file_operations = {
include/linux/buffer_head.h +1 -1
@@ -223,7 +223,7 @@ int cont_write_begin(struct file *, struct address_space *, loff_t, get_block_t *, loff_t *);int generic_cont_expand_simple (struct inode *inode,loff_t size);int block_commit_write (struct page *page,unsigned from,unsigned to); -int block_page_mkwrite (struct vm_area_struct *vma,struct page *page, +int block_page_mkwrite (struct vm_area_struct *vma,struct vm_fault *vmf,get_block_t get_block);void block_sync_page (struct page *);sector_t generic_block_bmap (struct address_space *,sector_t ,get_block_t *);
include/linux/compiler.h +2 -1
@@ -75,7 +75,8 @@ struct ftrace_branch_data {* Note: DISABLE_BRANCH_PROFILING can be used by special lowlevel code * to disable branch tracing on a per file basis. */ -#if defined(CONFIG_TRACE_BRANCH_PROFILING ) && !defined(DISABLE_BRANCH_PROFILING ) +#if defined(CONFIG_TRACE_BRANCH_PROFILING ) \ + && !defined(DISABLE_BRANCH_PROFILING ) && !defined(__CHECKER__)void ftrace_likely_update (struct ftrace_branch_data *f,int val,int expect);#define likely_notrace (x) __builtin_expect(!!(x), 1)
include/linux/mm.h +2 -1
@@ -145,6 +145,7 @@ extern pgprot_t protection_map[16];#define FAULT_FLAG_WRITE 0x01/* Fault was a write access */ #define FAULT_FLAG_NONLINEAR 0x02/* Fault was via a nonlinear mapping */ +#define FAULT_FLAG_MKWRITE 0x04/* Fault was mkwrite of existing pte */ /* * This interface is used by x86 PAT code to identify a pfn mapping that is
@@ -197,7 +198,7 @@ struct vm_operations_struct {/* notification that a previously read-only page is about to become * writable, if an error is returned it will cause a SIGBUS */ -int (*page_mkwrite)(struct vm_area_struct *vma,struct page *page); +int (*page_mkwrite)(struct vm_area_struct *vma,struct vm_fault *vmf);/* called by access_process_vm when get_user_pages() fails, typically * for use by special VMAs that can switch between memory and hardware
include/linux/splice.h +12 -0
@@ -36,6 +36,8 @@ struct splice_desc {void *data;/* cookie */ } u;loff_t pos;/* file position */ +size_t num_spliced;/* number of bytes already spliced */ +bool need_wakeup;/* need to wake up writer */ };struct partial_page {
@@ -66,6 +68,16 @@ extern ssize_t splice_from_pipe(struct pipe_inode_info *, struct file *, splice_actor *);extern ssize_t __splice_from_pipe (struct pipe_inode_info *,struct splice_desc *,splice_actor *); +extern int splice_from_pipe_feed (struct pipe_inode_info *,struct splice_desc *, +splice_actor *); +extern int splice_from_pipe_next (struct pipe_inode_info *, +struct splice_desc *); +extern void splice_from_pipe_begin (struct splice_desc *); +extern void splice_from_pipe_end (struct pipe_inode_info *, +struct splice_desc *); +extern int pipe_to_file (struct pipe_inode_info *,struct pipe_buffer *, +struct splice_desc *); +extern ssize_t splice_to_pipe (struct pipe_inode_info *,struct splice_pipe_desc *); extern ssize_t splice_direct_to_actor(struct file *, struct splice_desc *,
include/net/cipso_ipv4.h +17 -0
@@ -40,6 +40,7 @@#include <linux/net.h> #include <linux/skbuff.h> #include <net/netlabel.h> +#include <net/request_sock.h> #include <asm/atomic.h> /* known doi values */
@@ -215,6 +216,10 @@ int cipso_v4_sock_setattr(struct sock *sk, const struct netlbl_lsm_secattr *secattr);void cipso_v4_sock_delattr (struct sock *sk);int cipso_v4_sock_getattr (struct sock *sk,struct netlbl_lsm_secattr *secattr); +int cipso_v4_req_setattr (struct request_sock *req, +const struct cipso_v4_doi *doi_def, +const struct netlbl_lsm_secattr *secattr); +void cipso_v4_req_delattr (struct request_sock *req);int cipso_v4_skbuff_setattr (struct sk_buff *skb,const struct cipso_v4_doi *doi_def,const struct netlbl_lsm_secattr *secattr);
@@ -247,6 +252,18 @@ static inline int cipso_v4_sock_getattr(struct sock *sk,return -ENOSYS ; } +static inline int cipso_v4_req_setattr (struct request_sock *req, +const struct cipso_v4_doi *doi_def, +const struct netlbl_lsm_secattr *secattr) +{ +return -ENOSYS ; +} + +static inline void cipso_v4_req_delattr (struct request_sock *req) +{ +return ; +} +static inline int cipso_v4_skbuff_setattr (struct sk_buff *skb,const struct cipso_v4_doi *doi_def,const struct netlbl_lsm_secattr *secattr)
include/net/netlabel.h +14 -1
@@ -36,6 +36,7 @@#include <linux/in.h> #include <linux/in6.h> #include <net/netlink.h> +#include <net/request_sock.h> #include <asm/atomic.h> struct cipso_v4_doi ;
@@ -413,6 +414,9 @@ int netlbl_sock_getattr(struct sock *sk,int netlbl_conn_setattr (struct sock *sk,struct sockaddr *addr,const struct netlbl_lsm_secattr *secattr); +int netlbl_req_setattr (struct request_sock *req, +const struct netlbl_lsm_secattr *secattr); +void netlbl_req_delattr (struct request_sock *req);int netlbl_skbuff_setattr (struct sk_buff *skb,u16 family,const struct netlbl_lsm_secattr *secattr);
@@ -519,7 +523,7 @@ static inline int netlbl_enabled(void)return 0 ; }static inline int netlbl_sock_setattr (struct sock *sk, -const struct netlbl_lsm_secattr *secattr) +const struct netlbl_lsm_secattr *secattr) {return -ENOSYS ; }
@@ -537,6 +541,15 @@ static inline int netlbl_conn_setattr(struct sock *sk, {return -ENOSYS ; } +static inline int netlbl_req_setattr (struct request_sock *req, +const struct netlbl_lsm_secattr *secattr) +{ +return -ENOSYS ; +} +static inline void netlbl_req_delattr (struct request_sock *req) +{ +return ; +}static inline int netlbl_skbuff_setattr (struct sk_buff *skb,u16 family,const struct netlbl_lsm_secattr *secattr)
mm/memory.c +97 -35
194 lines not on this page · raw message
net/ipv4/cipso_ipv4.c +130 -0
142 lines not on this page · raw message
net/ipv4/syncookies.c +5 -4
@@ -288,10 +288,6 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,if (!req) goto out; -if (security_inet_conn_request (sk, skb, req)) { -reqsk_free (req); - goto out; - } ireq =inet_rsk (req); treq =tcp_rsk (req); treq->rcv_isn =ntohl (th->seq) -1 ;
@@ -322,6 +318,11 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb, } } +if (security_inet_conn_request (sk, skb, req)) { +reqsk_free (req); + goto out; + } + req->expires =0UL ; req->retrans =0 ;
net/ipv4/tcp_ipv4.c +4 -3
@@ -1239,14 +1239,15 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb)tcp_openreq_init (req, &tmp_opt, skb); -if (security_inet_conn_request (sk, skb, req)) - goto drop_and_free; - ireq =inet_rsk (req); ireq->loc_addr = daddr; ireq->rmt_addr = saddr; ireq->no_srccheck =inet_sk (sk)->transparent; ireq->opt =tcp_v4_save_options (sk, skb); + +if (security_inet_conn_request (sk, skb, req)) + goto drop_and_free; +if (!want_cookie)TCP_ECN_create_request (req,tcp_hdr (skb));
net/netlabel/netlabel_kapi.c +84 -0
90 lines not on this page · raw message
security/selinux/hooks.c +13 -36
114 lines not on this page · raw message
security/selinux/include/netlabel.h +14 -9
@@ -32,6 +32,7 @@#include <linux/net.h> #include <linux/skbuff.h> #include <net/sock.h> +#include <net/request_sock.h> #include "avc.h" #include "objsec.h"
@@ -42,8 +43,7 @@ void selinux_netlbl_cache_invalidate(void);void selinux_netlbl_err (struct sk_buff *skb,int error,int gateway);void selinux_netlbl_sk_security_free (struct sk_security_struct *ssec); -void selinux_netlbl_sk_security_reset (struct sk_security_struct *ssec, -int family); +void selinux_netlbl_sk_security_reset (struct sk_security_struct *ssec); int selinux_netlbl_skbuff_getsid(struct sk_buff *skb, u16 family,
@@ -53,8 +53,9 @@ int selinux_netlbl_skbuff_setsid(struct sk_buff *skb,u16 family, u32 sid); -void selinux_netlbl_inet_conn_established (struct sock *sk,u16 family); -int selinux_netlbl_socket_post_create (struct socket *sock); +int selinux_netlbl_inet_conn_request (struct request_sock *req,u16 family); +void selinux_netlbl_inet_csk_clone (struct sock *sk,u16 family); +int selinux_netlbl_socket_post_create (struct sock *sk,u16 family);int selinux_netlbl_inode_permission (struct inode *inode,int mask); int selinux_netlbl_sock_rcv_skb(struct sk_security_struct *sksec, struct sk_buff *skb,
@@ -85,8 +86,7 @@ static inline void selinux_netlbl_sk_security_free( }static inline void selinux_netlbl_sk_security_reset ( -struct sk_security_struct *ssec, -int family) +struct sk_security_struct *ssec) {return ; }
@@ -113,12 +113,17 @@ static inline int selinux_netlbl_conn_setsid(struct sock *sk,return 0 ; } -static inline void selinux_netlbl_inet_conn_established (struct sock *sk, -u16 family) +static inline int selinux_netlbl_inet_conn_request (struct request_sock *req, +u16 family) +{ +return 0 ; +} +static inline void selinux_netlbl_inet_csk_clone (struct sock *sk,u16 family) {return ; } -static inline int selinux_netlbl_socket_post_create (struct socket *sock) +static inline int selinux_netlbl_socket_post_create (struct sock *sk, +u16 family) {return 0 ; }
security/selinux/netlabel.c +52 -133
233 lines not on this page · raw message
security/smack/smack.h +0 -1
@@ -40,7 +40,6 @@ struct superblock_smack {struct socket_smack {char *smk_out;/* outbound label */ char *smk_in;/* inbound label */ -int smk_labeled;/* label scheme */ char smk_packet[SMK_LABELLEN ];/* TCP peer label */ };
security/smack/smack_lsm.c +75 -55
213 lines not on this page · raw message
sound/pci/hda/patch_sigmatel.c +6 -1
@@ -4007,7 +4007,12 @@ static int stac92xx_init(struct hda_codec *codec) pinctl =snd_hda_codec_read (codec, nid,0 ,AC_VERB_GET_PIN_WIDGET_CONTROL ,0 );/* if PINCTL already set then skip */ -if (!(pinctl &AC_PINCTL_IN_EN )) { +/* Also, if both INPUT and OUTPUT are set, +* it must be a BIOS bug; need to override, too +*/ +if (!(pinctl &AC_PINCTL_IN_EN ) || + (pinctl &AC_PINCTL_OUT_EN )) { + pinctl &= ~AC_PINCTL_OUT_EN ; pinctl |=AC_PINCTL_IN_EN ;stac92xx_auto_set_pinctl (codec, nid, pinctl);
sound/soc/codecs/wm8990.c +20 -20
@@ -744,7 +744,7 @@ SND_SOC_DAPM_MIXER_E("INMIXL", WM8990_INTDRIVBITS, WM8990_INMIXL_PWR_BIT, 0, inmixer_event, SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD),/* AINLMUX */ -SND_SOC_DAPM_MUX_E ("AILNMUX" ,WM8990_INTDRIVBITS ,WM8990_AINLMUX_PWR_BIT ,0 , +SND_SOC_DAPM_MUX_E ("AINLMUX" ,WM8990_INTDRIVBITS ,WM8990_AINLMUX_PWR_BIT ,0 , &wm8990_dapm_ainlmux_controls, inmixer_event, SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD),
@@ -755,7 +755,7 @@ SND_SOC_DAPM_MIXER_E("INMIXR", WM8990_INTDRIVBITS, WM8990_INMIXR_PWR_BIT, 0, inmixer_event, SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD),/* AINRMUX */ -SND_SOC_DAPM_MUX_E ("AIRNMUX" ,WM8990_INTDRIVBITS ,WM8990_AINRMUX_PWR_BIT ,0 , +SND_SOC_DAPM_MUX_E ("AINRMUX" ,WM8990_INTDRIVBITS ,WM8990_AINRMUX_PWR_BIT ,0 , &wm8990_dapm_ainrmux_controls, inmixer_event, SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD),
@@ -863,40 +863,40 @@ static const struct snd_soc_dapm_route audio_map[] = { {"LIN12 PGA", "LIN2 Switch", "LIN2"},/* LIN34 PGA */ {"LIN34 PGA", "LIN3 Switch", "LIN3"}, - {"LIN34 PGA", "LIN4 Switch", "LIN4"}, + {"LIN34 PGA", "LIN4 Switch", "LIN4/RXN"},/* INMIXL */ {"INMIXL", "Record Left Volume", "LOMIX"}, {"INMIXL", "LIN2 Volume", "LIN2"}, {"INMIXL", "LINPGA12 Switch", "LIN12 PGA"}, {"INMIXL", "LINPGA34 Switch", "LIN34 PGA"}, -/* AILNMUX */ - {"AILNMUX", "INMIXL Mix", "INMIXL"}, - {"AILNMUX", "DIFFINL Mix", "LIN12PGA"}, - {"AILNMUX", "DIFFINL Mix", "LIN34PGA"}, - {"AILNMUX", "RXVOICE Mix", "LIN4/RXN"}, - {"AILNMUX", "RXVOICE Mix", "RIN4/RXP"}, +/* AINLMUX */ + {"AINLMUX", "INMIXL Mix", "INMIXL"}, + {"AINLMUX", "DIFFINL Mix", "LIN12 PGA"}, + {"AINLMUX", "DIFFINL Mix", "LIN34 PGA"}, + {"AINLMUX", "RXVOICE Mix", "LIN4/RXN"}, + {"AINLMUX", "RXVOICE Mix", "RIN4/RXP"},/* ADC */ - {"Left ADC", NULL, "AILNMUX"}, + {"Left ADC", NULL, "AINLMUX"},/* RIN12 PGA */ {"RIN12 PGA", "RIN1 Switch", "RIN1"}, {"RIN12 PGA", "RIN2 Switch", "RIN2"},/* RIN34 PGA */ {"RIN34 PGA", "RIN3 Switch", "RIN3"}, - {"RIN34 PGA", "RIN4 Switch", "RIN4"}, + {"RIN34 PGA", "RIN4 Switch", "RIN4/RXP"},/* INMIXL */ {"INMIXR", "Record Right Volume", "ROMIX"}, {"INMIXR", "RIN2 Volume", "RIN2"}, {"INMIXR", "RINPGA12 Switch", "RIN12 PGA"}, {"INMIXR", "RINPGA34 Switch", "RIN34 PGA"}, -/* AIRNMUX */ - {"AIRNMUX", "INMIXR Mix", "INMIXR"}, - {"AIRNMUX", "DIFFINR Mix", "RIN12PGA"}, - {"AIRNMUX", "DIFFINR Mix", "RIN34PGA"}, - {"AIRNMUX", "RXVOICE Mix", "RIN4/RXN"}, - {"AIRNMUX", "RXVOICE Mix", "RIN4/RXP"}, +/* AINRMUX */ + {"AINRMUX", "INMIXR Mix", "INMIXR"}, + {"AINRMUX", "DIFFINR Mix", "RIN12 PGA"}, + {"AINRMUX", "DIFFINR Mix", "RIN34 PGA"}, + {"AINRMUX", "RXVOICE Mix", "LIN4/RXN"}, + {"AINRMUX", "RXVOICE Mix", "RIN4/RXP"},/* ADC */ - {"Right ADC", NULL, "AIRNMUX"}, + {"Right ADC", NULL, "AINRMUX"},/* LOMIX */ {"LOMIX", "LOMIX RIN3 Bypass Switch", "RIN3"},
@@ -937,7 +937,7 @@ static const struct snd_soc_dapm_route audio_map[] = { {"LOPMIX", "LOPMIX Left Mixer PGA Switch", "LOPGA"},/* OUT3MIX */ - {"OUT3MIX", "OUT3MIX LIN4/RXP Bypass Switch", "LIN4/RXP"}, + {"OUT3MIX", "OUT3MIX LIN4/RXP Bypass Switch", "LIN4/RXN"}, {"OUT3MIX", "OUT3MIX Left Out PGA Switch", "LOPGA"}, /* OUT4MIX */
@@ -964,7 +964,7 @@ static const struct snd_soc_dapm_route audio_map[] = {/* Output Pins */ {"LON", NULL, "LONMIX"}, {"LOP", NULL, "LOPMIX"}, - {"OUT", NULL, "OUT3MIX"}, + {"OUT3", NULL, "OUT3MIX"}, {"LOUT", NULL, "LOUT PGA"}, {"SPKN", NULL, "SPKMIX"}, {"ROUT", NULL, "ROUT PGA"},
Hi. I have just updated my kernel from:
ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.29.4.tar.bz2
However, I am getting some errors after I make menuconfig:
exec make kpkg_version=12.013 -f /usr/share/kernel-package/ruleset/minimal.mk debian DEBIAN_REVISION=Build.1 APPEND_TO_VERSION=.amd64-x2.052009.1
tail: cannot open `debian/changelog' for reading: No such file or directory
dpkg-parsechangelog: failure: tail of debian/changelog gave error exit status 1
I've never had this problem before so was debian/ accidentally left out or is it intentionally gone now?
Thanks guys.
Derek
Quoted 13 lines · D. Kelly
Hi. I have just updated my kernel from:
ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.29.4.tar.bz2
However, I am getting some errors after I
make menuconfig:exec make kpkg_version=12.013 -f
/usr/share/kernel-package/ruleset/minimal.mkdebian DEBIAN_REVISION=Build.1 APPEND_TO_VERSION=.amd64-x2.052009.1
tail: cannot open `debian/changelog' for reading: No such file or directory
dpkg-parsechangelog: failure: tail of debian/changelog gave error exit status 1
Quoted 2 lines
I've never had this problem before so was debian/ accidentally left out or is it intentionally gone now?
There never has been a "debian/" directory in the kernel.org kernel releases, has there?
confused,
greg k-h
Quoted 11 lines · D. Kelly
Hi. I have just updated my kernel from:
ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.29.4.tar.bz2
However, I am getting some errors after I
make menuconfig:exec make kpkg_version=12.013 -f
/usr/share/kernel-package/ruleset/minimal.mkdebian DEBIAN_REVISION=Build.1 APPEND_TO_VERSION=.amd64-x2.052009.1
tail: cannot open `debian/changelog' for reading: No such file or directory
dpkg-parsechangelog: failure: tail of debian/changelog gave error exit status 1
Those are harmless messages, which are to be expected when using a kernel-package version from Debian Sid. The kernel will be build fine and correct.
Grüße,
S°
Signature · 1 line
Sig lost. Core dumped.