diff options
author | Greg Kroah-Hartman <gregkh@google.com> | 2020-09-23 10:39:26 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2020-09-23 10:39:26 +0200 |
commit | 78515aabd6418c4a8d60ddd56c6905fbc2be0b5a (patch) | |
tree | 0b6e352182d21a9bc3369958e8083514a4a71a16 /drivers/block | |
parent | 5fd2d19eeb9767339e1338eb6789495d1812065b (diff) | |
parent | 38779362ed7ce5c24c9ac88c45afaf93116fc459 (diff) |
Merge 4.4.237 into android-4.4-p
Changes in 4.4.237
ARM: dts: socfpga: fix register entry for timer3 on Arria10
scsi: libsas: Set data_dir as DMA_NONE if libata marks qc as NODATA
drivers/net/wan/lapbether: Added needed_tailroom
firestream: Fix memleak in fs_open
drivers/net/wan/lapbether: Set network_header before transmitting
xfs: initialize the shortform attr header padding entry
drivers/net/wan/hdlc_cisco: Add hard_header_len
ALSA: hda: fix a runtime pm issue in SOF when integrated GPU is disabled
gcov: Disable gcov build with GCC 10
iio: adc: mcp3422: fix locking scope
iio: adc: mcp3422: fix locking on error path
iio:light:ltr501 Fix timestamp alignment issue.
iio:accel:bmc150-accel: Fix timestamp alignment and prevent data leak.
iio:accel:mma8452: Fix timestamp alignment and prevent data leak.
USB: core: add helpers to retrieve endpoints
staging: wlan-ng: fix out of bounds read in prism2sta_probe_usb()
btrfs: fix wrong address when faulting in pages in the search ioctl
scsi: target: iscsi: Fix hang in iscsit_access_np() when getting tpg->np_login_sem
rbd: require global CAP_SYS_ADMIN for mapping and unmapping
fbcon: remove soft scrollback code
fbcon: remove now unusued 'softback_lines' cursor() argument
vgacon: remove software scrollback support
KVM: VMX: Don't freeze guest when event delivery causes an APIC-access exit
video: fbdev: fix OOB read in vga_8planes_imageblit()
USB: serial: ftdi_sio: add IDs for Xsens Mti USB converter
USB: serial: option: add support for SIM7070/SIM7080/SIM7090 modules
usb: Fix out of sync data toggle if a configured device is reconfigured
gcov: add support for GCC 10.1
NFSv4.1 handle ERR_DELAY error reclaiming locking state on delegation recall
scsi: pm8001: Fix memleak in pm8001_exec_internal_task_abort
scsi: lpfc: Fix FLOGI/PLOGI receive race condition in pt2pt discovery
SUNRPC: stop printk reading past end of string
rapidio: Replace 'select' DMAENGINES 'with depends on'
i2c: algo: pca: Reapply i2c bus settings after reset
MIPS: SNI: Fix MIPS_L1_CACHE_SHIFT
perf test: Free formats for perf pmu parse test
fbcon: Fix user font detection test at fbcon_resize().
MIPS: SNI: Fix spurious interrupts
USB: quirks: Add USB_QUIRK_IGNORE_REMOTE_WAKEUP quirk for BYD zhaoxin notebook
USB: UAS: fix disconnect by unplugging a hub
usblp: fix race between disconnect() and read()
Input: i8042 - add Entroware Proteus EL07R4 to nomux and reset lists
serial: 8250_pci: Add Realtek 816a and 816b
ehci-hcd: Move include to keep CRC stable
powerpc/dma: Fix dma_map_ops::get_required_mask
x86/defconfig: Enable CONFIG_USB_XHCI_HCD=y
Linux 4.4.237
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If3f7701823084090849a6866ba1e52a0276c9621
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/rbd.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index e0699a20859f..445ca973edd6 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -3945,6 +3945,9 @@ static ssize_t rbd_image_refresh(struct device *dev, struct rbd_device *rbd_dev = dev_to_rbd_dev(dev); int ret; + if (!capable(CAP_SYS_ADMIN)) + return -EPERM; + ret = rbd_dev_refresh(rbd_dev); if (ret) return ret; @@ -5404,6 +5407,9 @@ static ssize_t do_rbd_add(struct bus_type *bus, bool read_only; int rc; + if (!capable(CAP_SYS_ADMIN)) + return -EPERM; + if (!try_module_get(THIS_MODULE)) return -ENODEV; @@ -5548,6 +5554,9 @@ static ssize_t do_rbd_remove(struct bus_type *bus, bool already = false; int ret; + if (!capable(CAP_SYS_ADMIN)) + return -EPERM; + ret = kstrtoul(buf, 10, &ul); if (ret) return ret; |