Linux 3.18.75
Greg KH
maintainerI'm announcing the release of the 3.18.75 kernel.
All users of the 3.18 kernel series must upgrade.
The updated 3.18.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.18.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 - drivers/base/platform.c | 3 + drivers/gpu/drm/i915/intel_bios.c | 7 +++ drivers/hid/i2c-hid/i2c-hid.c | 3 + drivers/iio/adc/ad7793.c | 4 +- drivers/iio/adc/ad_sigma_delta.c | 28 ++++++++++++++ drivers/iio/adc/mcp320x.c | 1 drivers/iio/industrialio-core.c | 4 +- drivers/staging/iio/adc/ad7192.c | 4 -- drivers/usb/core/config.c | 16 ++++++-- drivers/usb/core/devio.c | 6 ++- drivers/usb/core/hub.c | 2 - drivers/usb/gadget/legacy/inode.c | 49 +++++++++++++++++++++---- drivers/usb/gadget/udc/dummy_hcd.c | 24 ++++++++++-- drivers/usb/host/pci-quirks.c | 8 ++-- drivers/usb/host/xhci.h | 2 - drivers/usb/renesas_usbhs/fifo.c | 21 +++++++++- drivers/usb/storage/uas-detect.h | 15 ++++--- drivers/usb/storage/uas.c | 10 ++--- drivers/usb/storage/unusual_devs.h | 7 +++ drivers/uwb/hwa-rc.c | 2 + drivers/uwb/uwbd.c | 12 ++++-- fs/ext4/acl.c | 22 +++++++---- fs/ext4/inode.c | 64 +++++++++++++++++++-------------- fs/ext4/super.c | 9 ++++ fs/super.c | 6 +-- fs/xattr.c | 2 - include/linux/iio/adc/ad_sigma_delta.h | 3 + include/uapi/linux/usb/ch9.h | 1 security/smack/smack_lsm.c | 55 ++++++++++++---------------- sound/usb/card.c | 20 ++++++++++ sound/usb/usx2y/usb_stream.c | 6 ++- 32 files changed, 298 insertions(+), 120 deletions(-)
Adrian Salido (1):
HID: i2c-hid: allocate hid buffers for real worst case
Alan Stern (6):
USB: gadgetfs: Fix crash caused by inadequate synchronization
USB: gadgetfs: fix copy_to_user while holding spinlock
usb-storage: unusual_devs entry to fix write-access regression for Seagate external drives
USB: dummy-hcd: fix connection failures (wrong speed)
USB: dummy-hcd: fix infinite-loop resubmission bug
USB: uas: fix bug in handling of alternate settings
Andrey Konovalov (2):
uwb: properly check kthread_run return value
uwb: ensure that endpoint is interrupt
Casey Schaufler (1):
lsm: fix smack_inode_removexattr and xattr_getsecurity memleak
Dan Carpenter (1):
USB: devio: Don't corrupt user memory
David Eccher (1):
usb: gadget: inode.c: fix unbalanced spin_lock in ep0_write
Dmitry Fleytman (1):
usb: Increase quirk delay for USB devices
Dragos Bogdan (2):
iio: ad_sigma_delta: Implement a dedicated reset function
iio: ad7793: Fix the serial interface reset
Eryu Guan (1):
ext4: validate s_first_meta_bg at mount time
Greg Kroah-Hartman (2):
USB: fix out-of-bounds in usb_set_configuration Linux 3.18.75
Jan Kara (2):
ext4: fix data corruption for mmap writes
ext4: Don't clear SGID when inheriting ACLs
Jani Nikula (1):
drm/i915/bios: ignore HDMI on port A
Jim Dickerson (1):
usb: pci-quirks.c: Corrected timeout values used in handshake
Josef Bacik (1):
ext4: only call ext4_truncate when size <= isize
Lukas Wunner (1):
iio: adc: mcp320x: Fix oops on module unload
Mathias Nyman (1):
xhci: fix finding correct bus_state structure for USB 3.1 hosts
Matt Fornero (1):
iio: core: Return error for failed read_reg
Nicolai Stange (1):
driver core: platform: Don't read past the end of "driver_override" buffer
Oleg Nesterov (1):
fs/super.c: fix race between freeze_super() and thaw_super()
Stefan Popa (1):
staging: iio: ad7192: Fix - use the dedicated reset function avoiding dma from stack.
Takashi Iwai (2):
ALSA: usb-audio: Check out-of-bounds access by corrupted buffer descriptor
ALSA: usx2y: Suppress kernel warning at page allocation failures
Theodore Ts'o (1):
ext4: fix fencepost in s_first_meta_bg validation
Yoshihiro Shimoda (2):
usb: renesas_usbhs: fix the BCLR setting condition for non-DCP pipe
usb: renesas_usbhs: fix usbhsf_fifo_clear() for RX direction
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 18 -SUBLEVEL = 74 +SUBLEVEL = 75 EXTRAVERSION = NAME = Diseased Newt
drivers/base/platform.c +2 -1
@@ -729,7 +729,8 @@ static ssize_t driver_override_store(struct device *dev,struct platform_device *pdev =to_platform_device (dev);char *driver_override, *old, *cp; -if (count >PATH_MAX ) +/* We need to keep extra room for a newline */ +if (count >= (PAGE_SIZE -1 ))return -EINVAL ; driver_override =kstrndup (buf, count,GFP_KERNEL );
drivers/gpu/drm/i915/intel_bios.c +7 -0
@@ -940,6 +940,13 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port, is_hdmi = is_dvi && (child->common.device_type &DEVICE_TYPE_NOT_HDMI_OUTPUT ) ==0 ; is_edp = is_dp && (child->common.device_type &DEVICE_TYPE_INTERNAL_CONNECTOR ); +if (port ==PORT_A && is_dvi) { +DRM_DEBUG_KMS ("VBT claims port A supports DVI%s, ignoring\n" , + is_hdmi ?"/HDMI" :"" ); + is_dvi = false; + is_hdmi = false; + } + info->supports_dvi = is_dvi; info->supports_hdmi = is_hdmi; info->supports_dp = is_dp;
drivers/hid/i2c-hid/i2c-hid.c +2 -1
@@ -526,7 +526,8 @@ static int i2c_hid_alloc_buffers(struct i2c_hid *ihid, size_t report_size) {/* the worst case is computed from the set_report command with a * reportID > 15 and the maximum report length */ -int args_len =sizeof (__u8) +/* optional ReportID byte */ +int args_len =sizeof (__u8) +/* ReportID */ +sizeof (__u8) +/* optional ReportID byte */ sizeof (__u16) +/* data register */ sizeof (__u16) +/* size of the report */ report_size;/* report */
drivers/iio/adc/ad7793.c +2 -2
@@ -257,7 +257,7 @@ static int ad7793_setup(struct iio_dev *indio_dev, unsigned int vref_mv) {struct ad7793_state *st =iio_priv (indio_dev); -int i, ret =-1 ; +int i, ret;unsigned long long scale_uv;u32 id;
@@ -266,7 +266,7 @@ static int ad7793_setup(struct iio_dev *indio_dev,return ret;/* reset the serial interface */ - ret =spi_write (st->sd.spi, (u8 *)&ret,sizeof (ret)); + ret =ad_sd_reset (&st->sd,32 );if (ret <0 ) goto out;usleep_range (500 ,2000 );/* Wait for at least 500us */
drivers/iio/adc/ad_sigma_delta.c +28 -0
@@ -177,6 +177,34 @@ out: }EXPORT_SYMBOL_GPL (ad_sd_read_reg); +/** +* ad_sd_reset() - Reset the serial interface +* +* @sigma_delta: The sigma delta device +* @reset_length: Number of SCLKs with DIN = 1 +* +* Returns 0 on success, an error code otherwise. +**/ +int ad_sd_reset (struct ad_sigma_delta *sigma_delta, +unsigned int reset_length) +{ +uint8_t *buf; +unsigned int size; +int ret; + + size =DIV_ROUND_UP (reset_length,8 ); + buf =kcalloc (size,sizeof (*buf),GFP_KERNEL ); +if (!buf) +return -ENOMEM ; + +memset (buf,0xff , size); + ret =spi_write (sigma_delta->spi, buf, size); +kfree (buf); + +return ret; +} +EXPORT_SYMBOL_GPL (ad_sd_reset); +static int ad_sd_calibrate (struct ad_sigma_delta *sigma_delta,unsigned int mode,unsigned int channel) {
drivers/iio/adc/mcp320x.c +1 -0
@@ -180,6 +180,7 @@ static int mcp320x_probe(struct spi_device *spi) indio_dev->name =spi_get_device_id (spi)->name; indio_dev->modes =INDIO_DIRECT_MODE ; indio_dev->info = &mcp320x_info; +spi_set_drvdata (spi, indio_dev); chip_info = &mcp3208_chip_infos[spi_get_device_id (spi)->driver_data]; indio_dev->channels = chip_info->channels;
drivers/iio/industrialio-core.c +3 -1
@@ -188,8 +188,10 @@ static ssize_t iio_debugfs_read_reg(struct file *file, char __user *userbuf, ret = indio_dev->info->debugfs_reg_access (indio_dev, indio_dev->cached_reg_addr,0 , &val); -if (ret) +if (ret) {dev_err (indio_dev->dev.parent,"%s: read failed\n" , __func__); +return ret; + } len =snprintf (buf,sizeof (buf),"0x%X\n" , val);
drivers/staging/iio/adc/ad7192.c +1 -3
@@ -206,11 +206,9 @@ static int ad7192_setup(struct ad7192_state *st,struct iio_dev *indio_dev =spi_get_drvdata (st->sd.spi);unsigned long long scale_uv;int i, ret, id; -u8 ones[6 ];/* reset the serial interface */ -memset (&ones,0xFF ,6 ); - ret =spi_write (st->sd.spi, &ones,6 ); + ret =ad_sd_reset (&st->sd,48 );if (ret <0 ) goto out;usleep_range (500 ,1000 );/* Wait for at least 500us */
drivers/usb/core/config.c +12 -4
@@ -538,15 +538,23 @@ static int usb_parse_configuration(struct usb_device *dev, int cfgidx, }else if (header->bDescriptorType ==USB_DT_INTERFACE_ASSOCIATION ) { +struct usb_interface_assoc_descriptor *d; + + d = (struct usb_interface_assoc_descriptor *)header; +if (d->bLength <USB_DT_INTERFACE_ASSOCIATION_SIZE ) { +dev_warn (ddev, +"config %d has an invalid interface association descriptor of length %d, skipping\n" , + cfgno, d->bLength); +continue ; + } +if (iad_num ==USB_MAXIADS ) {dev_warn (ddev,"found more Interface " "Association Descriptors " "than allocated for in " "configuration %d\n" , cfgno); }else { - config->intf_assoc[iad_num] = - (struct usb_interface_assoc_descriptor - *)header; + config->intf_assoc[iad_num] = d; iad_num++; }
@@ -747,7 +755,7 @@ int usb_get_configuration(struct usb_device *dev) }if (dev->quirks &USB_QUIRK_DELAY_INIT ) -msleep (100 ); +msleep (200 ); result =usb_get_descriptor (dev,USB_DT_CONFIG , cfgno, bigbuffer, length);
drivers/usb/core/devio.c +5 -1
@@ -1413,7 +1413,11 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb totlen += isopkt[u].length; } u *=sizeof (struct usb_iso_packet_descriptor ); - uurb->buffer_length = totlen; +if (totlen <= uurb->buffer_length) + uurb->buffer_length = totlen; +else +WARN_ONCE (1 ,"uurb->buffer_length is too short %d vs %d" , + totlen, uurb->buffer_length);break ;default :
drivers/usb/core/hub.c +1 -1
@@ -4719,7 +4719,7 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus, goto loop;if (udev->quirks &USB_QUIRK_DELAY_INIT ) -msleep (1000 ); +msleep (2000 );/* consecutive bus-powered hubs aren't reliable; they can * violate the voltage drop budget. if the new child has
drivers/usb/gadget/legacy/inode.c +41 -8
153 lines not on this page · raw message
drivers/usb/gadget/udc/dummy_hcd.c +20 -4
@@ -173,6 +173,8 @@ struct dummy_hcd {struct usb_device *udev;struct list_head urbp_list; +struct urbp *next_frame_urbp; +u32 stream_en_ep;u8 num_stream[30 /2 ];
@@ -976,7 +978,12 @@ static int dummy_udc_probe(struct platform_device *pdev)memzero_explicit (&dum->gadget,sizeof (struct usb_gadget )); dum->gadget.name = gadget_name; dum->gadget.ops = &dummy_ops; - dum->gadget.max_speed =USB_SPEED_SUPER ; +if (mod_data.is_super_speed) + dum->gadget.max_speed =USB_SPEED_SUPER ; +else if (mod_data.is_high_speed) + dum->gadget.max_speed =USB_SPEED_HIGH ; +else + dum->gadget.max_speed =USB_SPEED_FULL ; dum->gadget.dev.parent = &pdev->dev;init_dummy_udc_hw (dum);
@@ -1186,6 +1193,8 @@ static int dummy_urb_enqueue(list_add_tail (&urbp->urbp_list, &dum_hcd->urbp_list); urb->hcpriv = urbp; +if (!dum_hcd->next_frame_urbp) + dum_hcd->next_frame_urbp = urbp;if (usb_pipetype (urb->pipe) ==PIPE_CONTROL ) urb->error_count =1 ;/* mark as a new urb */
@@ -1689,6 +1698,7 @@ static void dummy_timer(unsigned long _dum_hcd)spin_unlock_irqrestore (&dum->lock, flags);return ; } + dum_hcd->next_frame_urbp =NULL ;for (i =0 ; i <DUMMY_ENDPOINTS ; i++) {if (!ep_name[i])
@@ -1705,6 +1715,10 @@ restart:int type;int status = -EINPROGRESS ; +/* stop when we reach URBs queued after the timer interrupt */ +if (urbp == dum_hcd->next_frame_urbp) +break ; + urb = urbp->urb;if (urb->unlinked) goto return_urb;
@@ -2492,8 +2506,6 @@ static struct hc_driver dummy_hcd = { .product_desc = "Dummy host controller", .hcd_priv_size = sizeof(struct dummy_hcd), - .flags = HCD_USB3 | HCD_SHARED, - .reset = dummy_setup, .start = dummy_start, .stop = dummy_stop,
@@ -2522,8 +2534,12 @@ static int dummy_hcd_probe(struct platform_device *pdev)dev_info (&pdev->dev,"%s, driver " DRIVER_VERSION "\n" , driver_desc); dum = *((void **)dev_get_platdata (&pdev->dev)); -if (!mod_data.is_super_speed) +if (mod_data.is_super_speed) + dummy_hcd.flags =HCD_USB3 |HCD_SHARED ; +else if (mod_data.is_high_speed) dummy_hcd.flags =HCD_USB2 ; +else + dummy_hcd.flags =HCD_USB11 ; hs_hcd =usb_create_hcd (&dummy_hcd, &pdev->dev,dev_name (&pdev->dev));if (!hs_hcd)return -ENOMEM ;
drivers/usb/host/pci-quirks.c +4 -4
@@ -970,7 +970,7 @@ EXPORT_SYMBOL_GPL(usb_disable_xhci_ports);* * Takes care of the handoff between the Pre-OS (i.e. BIOS) and the OS. * It signals to the BIOS that the OS wants control of the host controller, -* and then waits 5 seconds for the BIOS to hand over control. +* and then waits 1 second for the BIOS to hand over control. * If we timeout, assume the BIOS is broken and take control anyway. */ static void quirk_usb_handoff_xhci (struct pci_dev *pdev)
@@ -1016,9 +1016,9 @@ static void quirk_usb_handoff_xhci(struct pci_dev *pdev)if (val &XHCI_HC_BIOS_OWNED ) {writel (val |XHCI_HC_OS_OWNED , base + ext_cap_offset); -/* Wait for 5 seconds with 10 microsecond polling interval */ +/* Wait for 1 second with 10 microsecond polling interval */ timeout =handshake (base + ext_cap_offset,XHCI_HC_BIOS_OWNED , -0 ,5000 ,10 ); +0 ,1000000 ,10 );/* Assume a buggy BIOS and take HC ownership anyway */ if (timeout) {
@@ -1046,7 +1046,7 @@ hc_init:* operational or runtime registers. Wait 5 seconds and no more. */ timeout =handshake (op_reg_base +XHCI_STS_OFFSET ,XHCI_STS_CNR ,0 , -5000 ,10 ); +5000000 ,10 );/* Assume a buggy HC and start HC initialization anyway */ if (timeout) { val =readl (op_reg_base +XHCI_STS_OFFSET );
drivers/usb/host/xhci.h +1 -1
@@ -1434,7 +1434,7 @@ struct xhci_bus_state {static inline unsigned int hcd_index (struct usb_hcd *hcd) { -if (hcd->speed ==HCD_USB3 ) +if (hcd->speed >=HCD_USB3 )return 0 ;else return 1 ;
drivers/usb/renesas_usbhs/fifo.c +18 -3
@@ -287,11 +287,26 @@ static void usbhsf_fifo_clear(struct usbhs_pipe *pipe, struct usbhs_fifo *fifo) {struct usbhs_priv *priv =usbhs_pipe_to_priv (pipe); +int ret =0 ; -if (!usbhs_pipe_is_dcp (pipe)) -usbhsf_fifo_barrier (priv, fifo); +if (!usbhs_pipe_is_dcp (pipe)) { +/* +* This driver checks the pipe condition first to avoid -EBUSY +* from usbhsf_fifo_barrier() with about 10 msec delay in +* the interrupt handler if the pipe is RX direction and empty. +*/ +if (usbhs_pipe_is_dir_in (pipe)) + ret =usbhs_pipe_is_accessible (pipe); +if (!ret) + ret =usbhsf_fifo_barrier (priv, fifo); + } -usbhs_write (priv, fifo->ctr,BCLR ); +/* +* if non-DCP pipe, this driver should set BCLR when +* usbhsf_fifo_barrier() returns 0. +*/ +if (!ret) +usbhs_write (priv, fifo->ctr,BCLR ); } static int usbhsf_fifo_rcv_len(struct usbhs_priv *priv,
drivers/usb/storage/uas-detect.h +8 -7
@@ -9,7 +9,8 @@ static int uas_is_interface(struct usb_host_interface *intf) intf->desc.bInterfaceProtocol == USB_PR_UAS); } -static int uas_find_uas_alt_setting (struct usb_interface *intf) +static struct usb_host_interface *uas_find_uas_alt_setting ( +struct usb_interface *intf) {int i;
@@ -17,10 +18,10 @@ static int uas_find_uas_alt_setting(struct usb_interface *intf)struct usb_host_interface *alt = &intf->altsetting[i];if (uas_is_interface (alt)) -return alt->desc.bAlternateSetting; +return alt; } -return -ENODEV ; +return NULL ; } static int uas_find_endpoints(struct usb_host_interface *alt,
@@ -58,14 +59,14 @@ static int uas_use_uas_driver(struct usb_interface *intf,struct usb_device *udev =interface_to_usbdev (intf);struct usb_hcd *hcd =bus_to_hcd (udev->bus);unsigned long flags = id->driver_info; -int r, alt; - +struct usb_host_interface *alt; +int r; alt =uas_find_uas_alt_setting (intf); -if (alt <0 ) +if (!alt)return 0 ; - r =uas_find_endpoints (&intf->altsetting[alt], eps); + r =uas_find_endpoints (alt, eps);if (r <0 )return 0 ;
drivers/usb/storage/uas.c +5 -5
@@ -866,14 +866,14 @@ MODULE_DEVICE_TABLE(usb, uas_usb_ids);static int uas_switch_interface (struct usb_device *udev,struct usb_interface *intf) { -int alt; +struct usb_host_interface *alt; alt =uas_find_uas_alt_setting (intf); -if (alt <0 ) -return alt; +if (!alt) +return -ENODEV ; -return usb_set_interface (udev, - intf->altsetting[0 ].desc.bInterfaceNumber, alt); +return usb_set_interface (udev, alt->desc.bInterfaceNumber, + alt->desc.bAlternateSetting); }static int uas_configure_endpoints (struct uas_dev_info *devinfo)
drivers/usb/storage/unusual_devs.h +7 -0
@@ -1379,6 +1379,13 @@ UNUSUAL_DEV( 0x0bc2, 0x3010, 0x0000, 0x0000, USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SANE_SENSE ), +/* Reported by Kris Lindgren <[email protected]> */ +UNUSUAL_DEV (0x0bc2 ,0x3332 ,0x0000 ,0x9999 , +"Seagate" , +"External" , +USB_SC_DEVICE ,USB_PR_DEVICE ,NULL , +US_FL_NO_WP_DETECT ), + UNUSUAL_DEV( 0x0d49, 0x7310, 0x0000, 0x9999, "Maxtor", "USB to SATA",
drivers/uwb/hwa-rc.c +2 -0
@@ -827,6 +827,8 @@ static int hwarc_probe(struct usb_interface *iface,if (iface->cur_altsetting->desc.bNumEndpoints <1 )return -ENODEV ; +if (!usb_endpoint_xfer_int (&iface->cur_altsetting->endpoint[0 ].desc)) +return -ENODEV ; result = -ENOMEM ; uwb_rc =uwb_rc_alloc ();
drivers/uwb/uwbd.c +8 -4
@@ -303,18 +303,22 @@ static int uwbd(void *param)/** Start the UWB daemon */ void uwbd_start (struct uwb_rc *rc) { - rc->uwbd.task =kthread_run (uwbd, rc,"uwbd" ); -if (rc->uwbd.task ==NULL ) +struct task_struct *task =kthread_run (uwbd, rc,"uwbd" ); +if (IS_ERR (task)) { + rc->uwbd.task =NULL ;printk (KERN_ERR "UWB: Cannot start management daemon; " "UWB won't work\n" ); -else + }else { + rc->uwbd.task = task; rc->uwbd.pid = rc->uwbd.task->pid; + } }/* Stop the UWB daemon and free any unprocessed events */ void uwbd_stop (struct uwb_rc *rc) { -kthread_stop (rc->uwbd.task); +if (rc->uwbd.task) +kthread_stop (rc->uwbd.task);uwbd_flush (rc); }
fs/ext4/acl.c +15 -7
@@ -200,13 +200,6 @@ __ext4_set_acl(handle_t *handle, struct inode *inode, int type,switch (type) {case ACL_TYPE_ACCESS : name_index =EXT4_XATTR_INDEX_POSIX_ACL_ACCESS ; -if (acl) { - error =posix_acl_update_mode (inode, &inode->i_mode, &acl); -if (error) -return error; - inode->i_ctime =ext4_current_time (inode); -ext4_mark_inode_dirty (handle, inode); - }break ;case ACL_TYPE_DEFAULT :
@@ -239,6 +232,8 @@ ext4_set_acl(struct inode *inode, struct posix_acl *acl, int type) {handle_t *handle;int error, retries =0 ; +umode_t mode = inode->i_mode; +int update_mode =0 ; retry: handle = ext4_journal_start(inode, EXT4_HT_XATTR,
@@ -246,7 +241,20 @@ retry:if (IS_ERR (handle))return PTR_ERR (handle); +if ((type ==ACL_TYPE_ACCESS ) && acl) { + error =posix_acl_update_mode (inode, &mode, &acl); +if (error) + goto out_stop; + update_mode =1 ; + } + error =__ext4_set_acl (handle, inode, type, acl); +if (!error && update_mode) { + inode->i_mode = mode; + inode->i_ctime =ext4_current_time (inode); +ext4_mark_inode_dirty (handle, inode); + } +out_stop:ext4_journal_stop (handle);if (error == -ENOSPC &&ext4_should_retry_alloc (inode->i_sb, &retries)) goto retry;
fs/ext4/inode.c +38 -26
114 lines not on this page · raw message
fs/ext4/super.c +9 -0
@@ -3931,6 +3931,15 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) (EXT4_MAX_BLOCK_FILE_PHYS / EXT4_BLOCKS_PER_GROUP(sb))); db_count = (sbi->s_groups_count +EXT4_DESC_PER_BLOCK (sb) -1 ) /EXT4_DESC_PER_BLOCK (sb); +if (EXT4_HAS_INCOMPAT_FEATURE (sb,EXT4_FEATURE_INCOMPAT_META_BG )) { +if (le32_to_cpu (es->s_first_meta_bg) > db_count) { +ext4_msg (sb,KERN_WARNING , +"first meta block group too large: %u " +"(group descriptor block count %u)" , +le32_to_cpu (es->s_first_meta_bg), db_count); + goto failed_mount; + } + } sbi->s_group_desc =ext4_kvmalloc (db_count *sizeof (struct buffer_head *),GFP_KERNEL );
fs/super.c +3 -3
@@ -1346,8 +1346,8 @@ int freeze_super(struct super_block *sb) } }/* -* This is just for debugging purposes so that fs can warn if it -* sees write activity when frozen is set to SB_FREEZE_COMPLETE. +* For debugging purposes so that fs can warn if it sees write activity +* when frozen is set to SB_FREEZE_COMPLETE, and for thaw_super(). */ sb->s_writers.frozen =SB_FREEZE_COMPLETE ;up_write (&sb->s_umount);
@@ -1366,7 +1366,7 @@ int thaw_super(struct super_block *sb)int error;down_write (&sb->s_umount); -if (sb->s_writers.frozen ==SB_UNFROZEN ) { +if (sb->s_writers.frozen !=SB_FREEZE_COMPLETE ) {up_write (&sb->s_umount);return -EINVAL ; }
fs/xattr.c +1 -1
@@ -163,7 +163,7 @@ xattr_getsecurity(struct inode *inode, const char *name, void *value, }memcpy (value, buffer, len); out: -security_release_secctx (buffer, len); +kfree (buffer); out_noalloc:return len; }
include/linux/iio/adc/ad_sigma_delta.h +3 -0
@@ -111,6 +111,9 @@ int ad_sd_write_reg(struct ad_sigma_delta *sigma_delta, unsigned int reg,int ad_sd_read_reg (struct ad_sigma_delta *sigma_delta,unsigned int reg,unsigned int size,unsigned int *val); +int ad_sd_reset (struct ad_sigma_delta *sigma_delta, +unsigned int reset_length); +int ad_sigma_delta_single_conversion (struct iio_dev *indio_dev,const struct iio_chan_spec *chan,int *val); int ad_sd_calibrate_all(struct ad_sigma_delta *sigma_delta,
include/uapi/linux/usb/ch9.h +1 -0
@@ -705,6 +705,7 @@ struct usb_interface_assoc_descriptor {__u8 iFunction; } __attribute__ ((packed)); +#define USB_DT_INTERFACE_ASSOCIATION_SIZE 8/*-------------------------------------------------------------------------*/
security/smack/smack_lsm.c +25 -30
75 lines not on this page · raw message
sound/usb/card.c +20 -0
@@ -220,6 +220,7 @@ static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif)struct usb_interface_descriptor *altsd;void *control_header;int i, protocol; +int rest_bytes;/* find audiocontrol interface */ host_iface = &usb_ifnum_to_if (dev, ctrlif)->altsetting[0 ];
@@ -234,6 +235,15 @@ static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif)return -EINVAL ; } + rest_bytes = (void *)(host_iface->extra + host_iface->extralen) - + control_header; + +/* just to be sure -- this shouldn't hit at all */ +if (rest_bytes <=0 ) { +dev_err (&dev->dev,"invalid control header\n" ); +return -EINVAL ; + } +switch (protocol) {default : dev_warn(&dev->dev,
@@ -244,11 +254,21 @@ static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif)case UAC_VERSION_1 : {struct uac1_ac_header_descriptor *h1 = control_header; +if (rest_bytes <sizeof (*h1)) { +dev_err (&dev->dev,"too short v1 buffer descriptor\n" ); +return -EINVAL ; + } +if (!h1->bInCollection) {dev_info (&dev->dev,"skipping empty audio interface (v1)\n" );return -EINVAL ; } +if (rest_bytes < h1->bLength) { +dev_err (&dev->dev,"invalid buffer length (v1)\n" ); +return -EINVAL ; + } +if (h1->bLength <sizeof (*h1) + h1->bInCollection) {dev_err (&dev->dev,"invalid UAC_HEADER (v1)\n" );return -EINVAL ;
sound/usb/usx2y/usb_stream.c +4 -2
@@ -191,7 +191,8 @@ struct usb_stream *usb_stream_new(struct usb_stream_kernel *sk, } pg =get_order (read_size); - sk->s = (void *)__get_free_pages (GFP_KERNEL |__GFP_COMP|__GFP_ZERO, pg); + sk->s = (void *)__get_free_pages (GFP_KERNEL |__GFP_COMP|__GFP_ZERO| + __GFP_NOWARN, pg);if (!sk->s) {snd_printk (KERN_WARNING "couldn't __get_free_pages()\n" ); goto out;
@@ -211,7 +212,8 @@ struct usb_stream *usb_stream_new(struct usb_stream_kernel *sk, pg =get_order (write_size); sk->write_page = - (void *)__get_free_pages (GFP_KERNEL |__GFP_COMP|__GFP_ZERO, pg); + (void *)__get_free_pages (GFP_KERNEL |__GFP_COMP|__GFP_ZERO| + __GFP_NOWARN, pg);if (!sk->write_page) {snd_printk (KERN_WARNING "couldn't __get_free_pages()\n" );usb_stream_free (sk);