This is the 4.14.304 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmPPdS8ACgkQONu9yGCS aT5psQ/+Iyngm/jjMuN+6oL/fRNU28tq0pERbLEONdrN0JYISIRZ7jcQ42xrZRrY cEXfPRIwKU/Y59RLvA4W0ksbahpJnSu5GBkHA34DHQEGMHhPF6qWdWCB047QkPN5 vW6HprHoXHGTgRud16751cpHk48WWp4KgA6HdRV6qm6elWBHeOpLmM6/iRRz+m+B quM8RPIsVyjf3n1tpiMyTH6oDEf8LR1H7cy9TMHJE55sQGLcwBJxU8IWN6rN8NI0 TdM+kMTIzx+VBvb8LDUgaz7yP5CDkeYz0u08UFt912EsYyvVi4Xi5YZeSUdMhqCu Dy4RqGX8Jo2F8o9yzJRNsptmOI+dL0+3f4Z5woshzGPqFZrl8HYzHZXdFjtmyK1r D19KO6qhRq1Dmty0GU8RNUdsgfHByNgeenoFMXzgO0YYI9zq2g2DykjuS8ej196W SLRJ3PaITN6pxPF02230eGROXxnGRC5sLtZJ0h7062dnyfeqOJu5zvPDvV3jfjua 1a67frpE5ONUWSpWP3TrdL+FIKTyYEU+5zypvWiLXl852K9D51f8u27vO5ayTxTr H8HOXFAP+6g2HeGAMxp3nj86zGJBzgXrGtw18MQYRKT4B9CXp089yrbmfRCSiMwA kCgDEpZzpuJ7DCPHs/IvkeYke5PmThG0jFryiLEEbpaoy2SRJX8= =3BVZ -----END PGP SIGNATURE----- Merge 4.14.304 into android-4.14-q Changes in 4.14.304 pNFS/filelayout: Fix coalescing test for single DS net/ethtool/ioctl: return -EOPNOTSUPP if we have no phy stats RDMA/srp: Move large values to a new enum for gcc13 f2fs: let's avoid panic if extent_tree is not created nilfs2: fix general protection fault in nilfs_btree_insert() xhci-pci: set the dma max_seg_size usb: xhci: Check endpoint is valid before dereferencing it prlimit: do_prlimit needs to have a speculation check USB: serial: option: add Quectel EM05-G (GR) modem USB: serial: option: add Quectel EM05-G (CS) modem USB: serial: option: add Quectel EM05-G (RS) modem USB: serial: option: add Quectel EC200U modem USB: serial: option: add Quectel EM05CN (SG) modem USB: serial: option: add Quectel EM05CN modem USB: misc: iowarrior: fix up header size for USB_DEVICE_ID_CODEMERCS_IOW100 usb: core: hub: disable autosuspend for TI TUSB8041 USB: serial: cp210x: add SCALANCE LPE-9000 device id usb: host: ehci-fsl: Fix module alias usb: gadget: g_webcam: Send color matching descriptor per frame usb: gadget: f_ncm: fix potential NULL ptr deref in ncm_bitrate() usb-storage: apply IGNORE_UAS only for HIKSEMI MD202 on RTL9210 serial: pch_uart: Pass correct sg to dma_unmap_sg() serial: atmel: fix incorrect baudrate setup gsmi: fix null-deref in gsmi_get_variable x86/fpu: Use _Alignof to avoid undefined behavior in TYPE_ALIGN Linux 4.14.304 Change-Id: I133848b8231ad687aa005258cd9563abac93fdce Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
455290f3e0
22 changed files with 98 additions and 36 deletions
2
Makefile
2
Makefile
|
|
@ -1,7 +1,7 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 14
|
||||
SUBLEVEL = 303
|
||||
SUBLEVEL = 304
|
||||
EXTRAVERSION =
|
||||
NAME = Petit Gorille
|
||||
|
||||
|
|
|
|||
|
|
@ -138,9 +138,6 @@ static void __init fpu__init_system_generic(void)
|
|||
unsigned int fpu_kernel_xstate_size;
|
||||
EXPORT_SYMBOL_GPL(fpu_kernel_xstate_size);
|
||||
|
||||
/* Get alignment of the TYPE. */
|
||||
#define TYPE_ALIGN(TYPE) offsetof(struct { char x; TYPE test; }, test)
|
||||
|
||||
/*
|
||||
* Enforce that 'MEMBER' is the last field of 'TYPE'.
|
||||
*
|
||||
|
|
@ -148,8 +145,8 @@ EXPORT_SYMBOL_GPL(fpu_kernel_xstate_size);
|
|||
* because that's how C aligns structs.
|
||||
*/
|
||||
#define CHECK_MEMBER_AT_END_OF(TYPE, MEMBER) \
|
||||
BUILD_BUG_ON(sizeof(TYPE) != ALIGN(offsetofend(TYPE, MEMBER), \
|
||||
TYPE_ALIGN(TYPE)))
|
||||
BUILD_BUG_ON(sizeof(TYPE) != \
|
||||
ALIGN(offsetofend(TYPE, MEMBER), _Alignof(TYPE)))
|
||||
|
||||
/*
|
||||
* We append the 'struct fpu' to the task_struct:
|
||||
|
|
|
|||
|
|
@ -343,9 +343,10 @@ static efi_status_t gsmi_get_variable(efi_char16_t *name,
|
|||
memcpy(data, gsmi_dev.data_buf->start, *data_size);
|
||||
|
||||
/* All variables are have the following attributes */
|
||||
*attr = EFI_VARIABLE_NON_VOLATILE |
|
||||
EFI_VARIABLE_BOOTSERVICE_ACCESS |
|
||||
EFI_VARIABLE_RUNTIME_ACCESS;
|
||||
if (attr)
|
||||
*attr = EFI_VARIABLE_NON_VOLATILE |
|
||||
EFI_VARIABLE_BOOTSERVICE_ACCESS |
|
||||
EFI_VARIABLE_RUNTIME_ACCESS;
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&gsmi_dev.lock, flags);
|
||||
|
|
|
|||
|
|
@ -62,12 +62,14 @@ enum {
|
|||
SRP_DEFAULT_CMD_SQ_SIZE = SRP_DEFAULT_QUEUE_SIZE - SRP_RSP_SQ_SIZE -
|
||||
SRP_TSK_MGMT_SQ_SIZE,
|
||||
|
||||
SRP_TAG_NO_REQ = ~0U,
|
||||
SRP_TAG_TSK_MGMT = 1U << 31,
|
||||
|
||||
SRP_MAX_PAGES_PER_MR = 512,
|
||||
};
|
||||
|
||||
enum {
|
||||
SRP_TAG_NO_REQ = ~0U,
|
||||
SRP_TAG_TSK_MGMT = BIT(31),
|
||||
};
|
||||
|
||||
enum srp_target_state {
|
||||
SRP_TARGET_SCANNING,
|
||||
SRP_TARGET_LIVE,
|
||||
|
|
|
|||
|
|
@ -2538,13 +2538,7 @@ static void __init atmel_console_get_options(struct uart_port *port, int *baud,
|
|||
else if (mr == ATMEL_US_PAR_ODD)
|
||||
*parity = 'o';
|
||||
|
||||
/*
|
||||
* The serial core only rounds down when matching this to a
|
||||
* supported baud rate. Make sure we don't end up slightly
|
||||
* lower than one of those, as it would make us fall through
|
||||
* to a much lower baud rate than we really want.
|
||||
*/
|
||||
*baud = port->uartclk / (16 * (quot - 1));
|
||||
*baud = port->uartclk / (16 * quot);
|
||||
}
|
||||
|
||||
static int __init atmel_console_setup(struct console *co, char *options)
|
||||
|
|
|
|||
|
|
@ -806,7 +806,7 @@ static void pch_dma_tx_complete(void *arg)
|
|||
}
|
||||
xmit->tail &= UART_XMIT_SIZE - 1;
|
||||
async_tx_ack(priv->desc_tx);
|
||||
dma_unmap_sg(port->dev, sg, priv->orig_nent, DMA_TO_DEVICE);
|
||||
dma_unmap_sg(port->dev, priv->sg_tx_p, priv->orig_nent, DMA_TO_DEVICE);
|
||||
priv->tx_dma_use = 0;
|
||||
priv->nent = 0;
|
||||
priv->orig_nent = 0;
|
||||
|
|
|
|||
|
|
@ -40,6 +40,9 @@
|
|||
#define USB_PRODUCT_USB5534B 0x5534
|
||||
#define USB_VENDOR_CYPRESS 0x04b4
|
||||
#define USB_PRODUCT_CY7C65632 0x6570
|
||||
#define USB_VENDOR_TEXAS_INSTRUMENTS 0x0451
|
||||
#define USB_PRODUCT_TUSB8041_USB3 0x8140
|
||||
#define USB_PRODUCT_TUSB8041_USB2 0x8142
|
||||
#define HUB_QUIRK_CHECK_PORT_AUTOSUSPEND 0x01
|
||||
#define HUB_QUIRK_DISABLE_AUTOSUSPEND 0x02
|
||||
|
||||
|
|
@ -5394,6 +5397,16 @@ static const struct usb_device_id hub_id_table[] = {
|
|||
.idVendor = USB_VENDOR_GENESYS_LOGIC,
|
||||
.bInterfaceClass = USB_CLASS_HUB,
|
||||
.driver_info = HUB_QUIRK_CHECK_PORT_AUTOSUSPEND},
|
||||
{ .match_flags = USB_DEVICE_ID_MATCH_VENDOR
|
||||
| USB_DEVICE_ID_MATCH_PRODUCT,
|
||||
.idVendor = USB_VENDOR_TEXAS_INSTRUMENTS,
|
||||
.idProduct = USB_PRODUCT_TUSB8041_USB2,
|
||||
.driver_info = HUB_QUIRK_DISABLE_AUTOSUSPEND},
|
||||
{ .match_flags = USB_DEVICE_ID_MATCH_VENDOR
|
||||
| USB_DEVICE_ID_MATCH_PRODUCT,
|
||||
.idVendor = USB_VENDOR_TEXAS_INSTRUMENTS,
|
||||
.idProduct = USB_PRODUCT_TUSB8041_USB3,
|
||||
.driver_info = HUB_QUIRK_DISABLE_AUTOSUSPEND},
|
||||
{ .match_flags = USB_DEVICE_ID_MATCH_DEV_CLASS,
|
||||
.bDeviceClass = USB_CLASS_HUB},
|
||||
{ .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS,
|
||||
|
|
|
|||
|
|
@ -92,7 +92,9 @@ static inline struct f_ncm *func_to_ncm(struct usb_function *f)
|
|||
/* peak (theoretical) bulk transfer rate in bits-per-second */
|
||||
static inline unsigned ncm_bitrate(struct usb_gadget *g)
|
||||
{
|
||||
if (gadget_is_superspeed(g) && g->speed >= USB_SPEED_SUPER_PLUS)
|
||||
if (!g)
|
||||
return 0;
|
||||
else if (gadget_is_superspeed(g) && g->speed >= USB_SPEED_SUPER_PLUS)
|
||||
return 4250000000U;
|
||||
else if (gadget_is_superspeed(g) && g->speed == USB_SPEED_SUPER)
|
||||
return 3750000000U;
|
||||
|
|
|
|||
|
|
@ -299,6 +299,7 @@ static const struct uvc_descriptor_header * const uvc_fs_streaming_cls[] = {
|
|||
(const struct uvc_descriptor_header *) &uvc_format_yuv,
|
||||
(const struct uvc_descriptor_header *) &uvc_frame_yuv_360p,
|
||||
(const struct uvc_descriptor_header *) &uvc_frame_yuv_720p,
|
||||
(const struct uvc_descriptor_header *) &uvc_color_matching,
|
||||
(const struct uvc_descriptor_header *) &uvc_format_mjpg,
|
||||
(const struct uvc_descriptor_header *) &uvc_frame_mjpg_360p,
|
||||
(const struct uvc_descriptor_header *) &uvc_frame_mjpg_720p,
|
||||
|
|
@ -311,6 +312,7 @@ static const struct uvc_descriptor_header * const uvc_hs_streaming_cls[] = {
|
|||
(const struct uvc_descriptor_header *) &uvc_format_yuv,
|
||||
(const struct uvc_descriptor_header *) &uvc_frame_yuv_360p,
|
||||
(const struct uvc_descriptor_header *) &uvc_frame_yuv_720p,
|
||||
(const struct uvc_descriptor_header *) &uvc_color_matching,
|
||||
(const struct uvc_descriptor_header *) &uvc_format_mjpg,
|
||||
(const struct uvc_descriptor_header *) &uvc_frame_mjpg_360p,
|
||||
(const struct uvc_descriptor_header *) &uvc_frame_mjpg_720p,
|
||||
|
|
@ -323,6 +325,7 @@ static const struct uvc_descriptor_header * const uvc_ss_streaming_cls[] = {
|
|||
(const struct uvc_descriptor_header *) &uvc_format_yuv,
|
||||
(const struct uvc_descriptor_header *) &uvc_frame_yuv_360p,
|
||||
(const struct uvc_descriptor_header *) &uvc_frame_yuv_720p,
|
||||
(const struct uvc_descriptor_header *) &uvc_color_matching,
|
||||
(const struct uvc_descriptor_header *) &uvc_format_mjpg,
|
||||
(const struct uvc_descriptor_header *) &uvc_frame_mjpg_360p,
|
||||
(const struct uvc_descriptor_header *) &uvc_frame_mjpg_720p,
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
#include "ehci-fsl.h"
|
||||
|
||||
#define DRIVER_DESC "Freescale EHCI Host controller driver"
|
||||
#define DRV_NAME "ehci-fsl"
|
||||
#define DRV_NAME "fsl-ehci"
|
||||
|
||||
static struct hc_driver __read_mostly fsl_ehci_hc_driver;
|
||||
|
||||
|
|
|
|||
|
|
@ -375,6 +375,8 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
|||
/* USB-2 and USB-3 roothubs initialized, allow runtime pm suspend */
|
||||
pm_runtime_put_noidle(&dev->dev);
|
||||
|
||||
dma_set_max_seg_size(&dev->dev, UINT_MAX);
|
||||
|
||||
return 0;
|
||||
|
||||
put_usb3_hcd:
|
||||
|
|
|
|||
|
|
@ -907,7 +907,10 @@ static void xhci_kill_endpoint_urbs(struct xhci_hcd *xhci,
|
|||
struct xhci_virt_ep *ep;
|
||||
struct xhci_ring *ring;
|
||||
|
||||
ep = &xhci->devs[slot_id]->eps[ep_index];
|
||||
ep = xhci_get_virt_ep(xhci, slot_id, ep_index);
|
||||
if (!ep)
|
||||
return;
|
||||
|
||||
if ((ep->ep_state & EP_HAS_STREAMS) ||
|
||||
(ep->ep_state & EP_GETTING_NO_STREAMS)) {
|
||||
int stream_id;
|
||||
|
|
|
|||
|
|
@ -836,7 +836,7 @@ static int iowarrior_probe(struct usb_interface *interface,
|
|||
break;
|
||||
|
||||
case USB_DEVICE_ID_CODEMERCS_IOW100:
|
||||
dev->report_size = 13;
|
||||
dev->report_size = 12;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ static const struct usb_device_id id_table[] = {
|
|||
{ USB_DEVICE(0x0846, 0x1100) }, /* NetGear Managed Switch M4100 series, M5300 series, M7100 series */
|
||||
{ USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */
|
||||
{ USB_DEVICE(0x08FD, 0x000A) }, /* Digianswer A/S , ZigBee/802.15.4 MAC Device */
|
||||
{ USB_DEVICE(0x0908, 0x0070) }, /* Siemens SCALANCE LPE-9000 USB Serial Console */
|
||||
{ USB_DEVICE(0x0908, 0x01FF) }, /* Siemens RUGGEDCOM USB Serial Console */
|
||||
{ USB_DEVICE(0x0988, 0x0578) }, /* Teraoka AD2000 */
|
||||
{ USB_DEVICE(0x0B00, 0x3070) }, /* Ingenico 3070 */
|
||||
|
|
|
|||
|
|
@ -258,10 +258,16 @@ static void option_instat_callback(struct urb *urb);
|
|||
#define QUECTEL_PRODUCT_EP06 0x0306
|
||||
#define QUECTEL_PRODUCT_EM05G 0x030a
|
||||
#define QUECTEL_PRODUCT_EM060K 0x030b
|
||||
#define QUECTEL_PRODUCT_EM05G_CS 0x030c
|
||||
#define QUECTEL_PRODUCT_EM05CN_SG 0x0310
|
||||
#define QUECTEL_PRODUCT_EM05G_SG 0x0311
|
||||
#define QUECTEL_PRODUCT_EM05CN 0x0312
|
||||
#define QUECTEL_PRODUCT_EM05G_GR 0x0313
|
||||
#define QUECTEL_PRODUCT_EM05G_RS 0x0314
|
||||
#define QUECTEL_PRODUCT_EM12 0x0512
|
||||
#define QUECTEL_PRODUCT_RM500Q 0x0800
|
||||
#define QUECTEL_PRODUCT_RM520N 0x0801
|
||||
#define QUECTEL_PRODUCT_EC200U 0x0901
|
||||
#define QUECTEL_PRODUCT_EC200S_CN 0x6002
|
||||
#define QUECTEL_PRODUCT_EC200T 0x6026
|
||||
#define QUECTEL_PRODUCT_RM500K 0x7001
|
||||
|
|
@ -1162,8 +1168,18 @@ static const struct usb_device_id option_ids[] = {
|
|||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0xff, 0xff),
|
||||
.driver_info = RSVD(1) | RSVD(2) | RSVD(3) | RSVD(4) | NUMEP2 },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05CN, 0xff),
|
||||
.driver_info = RSVD(6) | ZLP },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05CN_SG, 0xff),
|
||||
.driver_info = RSVD(6) | ZLP },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G, 0xff),
|
||||
.driver_info = RSVD(6) | ZLP },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G_GR, 0xff),
|
||||
.driver_info = RSVD(6) | ZLP },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G_CS, 0xff),
|
||||
.driver_info = RSVD(6) | ZLP },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G_RS, 0xff),
|
||||
.driver_info = RSVD(6) | ZLP },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G_SG, 0xff),
|
||||
.driver_info = RSVD(6) | ZLP },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM060K, 0xff, 0x00, 0x40) },
|
||||
|
|
@ -1183,6 +1199,7 @@ static const struct usb_device_id option_ids[] = {
|
|||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM520N, 0xff, 0xff, 0x30) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM520N, 0xff, 0, 0x40) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM520N, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200U, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200S_CN, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200T, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500K, 0xff, 0x00, 0x00) },
|
||||
|
|
|
|||
|
|
@ -116,6 +116,19 @@ static int uas_use_uas_driver(struct usb_interface *intf,
|
|||
if (le16_to_cpu(udev->descriptor.idVendor) == 0x0bc2)
|
||||
flags |= US_FL_NO_ATA_1X;
|
||||
|
||||
/*
|
||||
* RTL9210-based enclosure from HIKSEMI, MD202 reportedly have issues
|
||||
* with UAS. This isn't distinguishable with just idVendor and
|
||||
* idProduct, use manufacturer and product too.
|
||||
*
|
||||
* Reported-by: Hongling Zeng <zenghongling@kylinos.cn>
|
||||
*/
|
||||
if (le16_to_cpu(udev->descriptor.idVendor) == 0x0bda &&
|
||||
le16_to_cpu(udev->descriptor.idProduct) == 0x9210 &&
|
||||
(udev->manufacturer && !strcmp(udev->manufacturer, "HIKSEMI")) &&
|
||||
(udev->product && !strcmp(udev->product, "MD202")))
|
||||
flags |= US_FL_IGNORE_UAS;
|
||||
|
||||
usb_stor_adjust_quirks(udev, &flags);
|
||||
|
||||
if (flags & US_FL_IGNORE_UAS) {
|
||||
|
|
|
|||
|
|
@ -152,13 +152,6 @@ UNUSUAL_DEV(0x0bc2, 0xab2a, 0x0000, 0x9999,
|
|||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_NO_ATA_1X),
|
||||
|
||||
/* Reported-by: Hongling Zeng <zenghongling@kylinos.cn> */
|
||||
UNUSUAL_DEV(0x0bda, 0x9210, 0x0000, 0x9999,
|
||||
"Hiksemi",
|
||||
"External HDD",
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_IGNORE_UAS),
|
||||
|
||||
/* Reported-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> */
|
||||
UNUSUAL_DEV(0x13fd, 0x3940, 0x0000, 0x9999,
|
||||
"Initio Corporation",
|
||||
|
|
|
|||
|
|
@ -382,7 +382,8 @@ static bool f2fs_lookup_extent_tree(struct inode *inode, pgoff_t pgofs,
|
|||
struct extent_node *en;
|
||||
bool ret = false;
|
||||
|
||||
f2fs_bug_on(sbi, !et);
|
||||
if (!et)
|
||||
return false;
|
||||
|
||||
trace_f2fs_lookup_extent_tree_start(inode, pgofs);
|
||||
|
||||
|
|
|
|||
|
|
@ -837,6 +837,12 @@ filelayout_alloc_lseg(struct pnfs_layout_hdr *layoutid,
|
|||
return &fl->generic_hdr;
|
||||
}
|
||||
|
||||
static bool
|
||||
filelayout_lseg_is_striped(const struct nfs4_filelayout_segment *flseg)
|
||||
{
|
||||
return flseg->num_fh > 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* filelayout_pg_test(). Called by nfs_can_coalesce_requests()
|
||||
*
|
||||
|
|
@ -857,6 +863,8 @@ filelayout_pg_test(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev,
|
|||
size = pnfs_generic_pg_test(pgio, prev, req);
|
||||
if (!size)
|
||||
return 0;
|
||||
else if (!filelayout_lseg_is_striped(FILELAYOUT_LSEG(pgio->pg_lseg)))
|
||||
return size;
|
||||
|
||||
/* see if req and prev are in the same stripe */
|
||||
if (prev) {
|
||||
|
|
|
|||
|
|
@ -489,9 +489,18 @@ static int __nilfs_btree_get_block(const struct nilfs_bmap *btree, __u64 ptr,
|
|||
ret = nilfs_btnode_submit_block(btnc, ptr, 0, REQ_OP_READ, 0, &bh,
|
||||
&submit_ptr);
|
||||
if (ret) {
|
||||
if (ret != -EEXIST)
|
||||
return ret;
|
||||
goto out_check;
|
||||
if (likely(ret == -EEXIST))
|
||||
goto out_check;
|
||||
if (ret == -ENOENT) {
|
||||
/*
|
||||
* Block address translation failed due to invalid
|
||||
* value of 'ptr'. In this case, return internal code
|
||||
* -EINVAL (broken bmap) to notify bmap layer of fatal
|
||||
* metadata corruption.
|
||||
*/
|
||||
ret = -EINVAL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (ra) {
|
||||
|
|
|
|||
|
|
@ -1474,6 +1474,8 @@ int do_prlimit(struct task_struct *tsk, unsigned int resource,
|
|||
|
||||
if (resource >= RLIM_NLIMITS)
|
||||
return -EINVAL;
|
||||
resource = array_index_nospec(resource, RLIM_NLIMITS);
|
||||
|
||||
if (new_rlim) {
|
||||
if (new_rlim->rlim_cur > new_rlim->rlim_max)
|
||||
return -EINVAL;
|
||||
|
|
|
|||
|
|
@ -1969,7 +1969,8 @@ static int ethtool_get_phy_stats(struct net_device *dev, void __user *useraddr)
|
|||
return n_stats;
|
||||
if (n_stats > S32_MAX / sizeof(u64))
|
||||
return -ENOMEM;
|
||||
WARN_ON_ONCE(!n_stats);
|
||||
if (WARN_ON_ONCE(!n_stats))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (copy_from_user(&stats, useraddr, sizeof(stats)))
|
||||
return -EFAULT;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue