Linux 5.5.2
Greg KH
maintainerI'm announcing the release of the 5.5.2 kernel.
All users of the 5.5 kernel series must upgrade.
The updated 5.5.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.5.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/ABI/testing/sysfs-class-devfreq | 7 ++ Makefile | 2 arch/arm64/boot/Makefile | 2 arch/powerpc/kvm/book3s_pr.c | 1 arch/x86/kernel/cpu/resctrl/rdtgroup.c | 32 +++++++----- drivers/char/ttyprintk.c | 15 +++-- drivers/devfreq/devfreq.c | 9 +++ drivers/media/usb/dvb-usb/af9005.c | 2 drivers/media/usb/dvb-usb/digitv.c | 10 ++- drivers/media/usb/dvb-usb/dvb-usb-urb.c | 2 drivers/media/usb/dvb-usb/vp7045.c | 21 +++++--- drivers/media/usb/gspca/gspca.c | 2 fs/btrfs/super.c | 10 +++ fs/cifs/smb2pdu.c | 2 fs/gfs2/lops.c | 68 ++++++++++++++++---------- fs/namei.c | 4 - fs/reiserfs/super.c | 2 kernel/cgroup/cgroup.c | 11 ++-- lib/test_bitmap.c | 9 +-- mm/mempolicy.c | 6 +- net/bluetooth/hci_sock.c | 3 + security/tomoyo/common.c | 11 +--- tools/include/linux/string.h | 8 +++ tools/lib/string.c | 7 ++ tools/perf/builtin-c2c.c | 10 ++- 25 files changed, 172 insertions(+), 84 deletions(-)
Al Viro (1):
vfs: fix do_last() regression
Andreas Gruenbacher (1):
gfs2: Another gfs2_find_jhead fix
Andres Freund (1):
perf c2c: Fix return type for histogram sorting comparision functions
Andy Shevchenko (1):
lib/test_bitmap: correct test data offsets for 32-bit
Chanwoo Choi (1):
PM / devfreq: Add new name attribute for sysfs
Dan Carpenter (2):
mm/mempolicy.c: fix out of bounds write in mpol_parse_str()
Bluetooth: Fix race condition in hci_release_sock()
David Michael (1):
KVM: PPC: Book3S PR: Fix -Werror=return-type build failure
Dirk Behme (1):
arm64: kbuild: remove compressed images on 'make ARCH=arm64 (dist)clean'
Greg Kroah-Hartman (1):
Linux 5.5.2
Hans Verkuil (2):
media: gspca: zero usb_buf
media: dvb-usb/dvb-usb-urb.c: initialize actlen to 0
Jan Kara (1):
reiserfs: Fix memory leak of journal device string
Josef Bacik (1):
btrfs: do not zero f_bavail if we have available space
Michal Koutný (1):
cgroup: Prevent double killing of css when enabling threaded cgroup
Ronnie Sahlberg (1):
cifs: fix soft mounts hanging in the reconnect code
Sean Young (3):
media: digitv: don't continue if remote control state can't be read
media: af9005: uninitialized variable printked
media: vp7045: do not read uninitialized values if usb transfer fails
Tetsuo Handa (1):
tomoyo: Use atomic_t for statistics counter
Vitaly Chikunov (1):
tools lib: Fix builds when glibc contains strlcpy()
Xiaochen Shen (3):
x86/resctrl: Fix a deadlock due to inaccurate reference x86/resctrl: Fix use-after-free when deleting resource groups x86/resctrl: Fix use-after-free due to inaccurate refcount of rdtgroup
Zhenzhong Duan (1):
ttyprintk: fix a potential deadlock in interrupt context issue
Greg KH
maintainerDocumentation/ABI/testing/sysfs-class-devfreq +7 -0
@@ -7,6 +7,13 @@ Description: The name of devfreq object denoted as ... is same as the name of device using devfreq. +What: /sys/class/devfreq/.../name +Date: November 2019 +Contact: Chanwoo Choi <[email protected]> +Description: + The /sys/class/devfreq/.../name shows the name of device + of the corresponding devfreq object. + What: /sys/class/devfreq/.../governor Date: September 2011 Contact: MyungJoo Ham <[email protected]>
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 5 -SUBLEVEL = 1 +SUBLEVEL = 2 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/arm64/boot/Makefile +1 -1
@@ -16,7 +16,7 @@ OBJCOPYFLAGS_Image :=-O binary -R .note -R .note.gnu.build-id -R .comment -S -targets := Image Image.gz +targets := Image Image.bz2 Image.gz Image.lz4 Image.lzma Image.lzo $(obj)/Image: vmlinux FORCE $(call if_changed,objcopy)
arch/powerpc/kvm/book3s_pr.c +1 -0
@@ -2030,6 +2030,7 @@ static int kvm_vm_ioctl_get_smmu_info_pr(struct kvm *kvm, {/* We should not get called */ BUG (); +return 0 ; }#endif /* CONFIG_PPC64 */
arch/x86/kernel/cpu/resctrl/rdtgroup.c +20 -12
@@ -1970,7 +1970,7 @@ static int rdt_get_tree(struct fs_context *fc)if (rdt_mon_capable) { ret =mongroup_create_dir (rdtgroup_default.kn, -NULL ,"mon_groups" , + &rdtgroup_default,"mon_groups" , &kn_mongrp);if (ret <0 ) goto out_info;
@@ -2205,7 +2205,11 @@ static void free_all_child_rdtgrp(struct rdtgroup *rdtgrp)list_for_each_entry_safe (sentry, stmp, head, mon.crdtgrp_list) {free_rmid (sentry->mon.rmid);list_del (&sentry->mon.crdtgrp_list); -kfree (sentry); + +if (atomic_read (&sentry->waitcount) !=0 ) + sentry->flags =RDT_DELETED ; +else +kfree (sentry); } }
@@ -2243,7 +2247,11 @@ static void rmdir_all_sub(void)kernfs_remove (rdtgrp->kn);list_del (&rdtgrp->rdtgroup_list); -kfree (rdtgrp); + +if (atomic_read (&rdtgrp->waitcount) !=0 ) + rdtgrp->flags =RDT_DELETED ; +else +kfree (rdtgrp); }/* Notify online CPUs to update per cpu storage and PQR_ASSOC MSR */ update_closid_rmid (cpu_online_mask, &rdtgroup_default);
@@ -2446,7 +2454,7 @@ static int mkdir_mondata_all(struct kernfs_node *parent_kn,/* * Create the mon_data directory first. */ - ret =mongroup_create_dir (parent_kn,NULL ,"mon_data" , &kn); + ret =mongroup_create_dir (parent_kn, prgrp,"mon_data" , &kn);if (ret)return ret;
@@ -2645,7 +2653,7 @@ static int mkdir_rdt_prepare(struct kernfs_node *parent_kn,uint files =0 ;int ret; - prdtgrp =rdtgroup_kn_lock_live (prgrp_kn); + prdtgrp =rdtgroup_kn_lock_live (parent_kn);if (!prdtgrp) { ret = -ENODEV ; goto out_unlock;
@@ -2718,7 +2726,7 @@ static int mkdir_rdt_prepare(struct kernfs_node *parent_kn,kernfs_activate (kn);/* -* The caller unlocks the prgrp_kn upon success. +* The caller unlocks the parent_kn upon success. */ return 0 ;
@@ -2729,7 +2737,7 @@ static int mkdir_rdt_prepare(struct kernfs_node *parent_kn, out_free_rgrp:kfree (rdtgrp); out_unlock: -rdtgroup_kn_unlock (prgrp_kn); +rdtgroup_kn_unlock (parent_kn);return ret; }
@@ -2767,7 +2775,7 @@ static int rdtgroup_mkdir_mon(struct kernfs_node *parent_kn,*/ list_add_tail (&rdtgrp->mon.crdtgrp_list, &prgrp->mon.crdtgrp_list); -rdtgroup_kn_unlock (prgrp_kn); +rdtgroup_kn_unlock (parent_kn);return ret; }
@@ -2810,7 +2818,7 @@ static int rdtgroup_mkdir_ctrl_mon(struct kernfs_node *parent_kn,* Create an empty mon_groups directory to hold the subset * of tasks and cpus to monitor. */ - ret =mongroup_create_dir (kn,NULL ,"mon_groups" ,NULL ); + ret =mongroup_create_dir (kn, rdtgrp,"mon_groups" ,NULL );if (ret) {rdt_last_cmd_puts ("kernfs subdir error\n" ); goto out_del_list;
@@ -2826,7 +2834,7 @@ static int rdtgroup_mkdir_ctrl_mon(struct kernfs_node *parent_kn, out_common_fail:mkdir_rdt_prepare_clean (rdtgrp); out_unlock: -rdtgroup_kn_unlock (prgrp_kn); +rdtgroup_kn_unlock (parent_kn);return ret; }
@@ -2952,13 +2960,13 @@ static int rdtgroup_rmdir_ctrl(struct kernfs_node *kn, struct rdtgroup *rdtgrp,closid_free (rdtgrp->closid);free_rmid (rdtgrp->mon.rmid); +rdtgroup_ctrl_remove (kn, rdtgrp); +/* * Free all the child monitor group rmids. */ free_all_child_rdtgrp (rdtgrp); -rdtgroup_ctrl_remove (kn, rdtgrp); -return 0 ; }
drivers/char/ttyprintk.c +9 -6
@@ -15,10 +15,11 @@#include <linux/serial.h> #include <linux/tty.h> #include <linux/module.h> +#include <linux/spinlock.h> struct ttyprintk_port {struct tty_port port; -struct mutex port_write_mutex; +spinlock_t spinlock; };static struct ttyprintk_port tpk_port;
@@ -99,11 +100,12 @@ static int tpk_open(struct tty_struct *tty, struct file *filp)static void tpk_close (struct tty_struct *tty,struct file *filp) {struct ttyprintk_port *tpkp = tty->driver_data; +unsigned long flags; -mutex_lock (&tpkp->port_write_mutex); +spin_lock_irqsave (&tpkp->spinlock, flags);/* flush tpk_printk buffer */ tpk_printk (NULL ,0 ); -mutex_unlock (&tpkp->port_write_mutex); +spin_unlock_irqrestore (&tpkp->spinlock, flags);tty_port_close (&tpkp->port, tty, filp); }
@@ -115,13 +117,14 @@ static int tpk_write(struct tty_struct *tty, const unsigned char *buf, int count) {struct ttyprintk_port *tpkp = tty->driver_data; +unsigned long flags;int ret;/* exclusive use of tpk_printk within this tty */ -mutex_lock (&tpkp->port_write_mutex); +spin_lock_irqsave (&tpkp->spinlock, flags); ret =tpk_printk (buf, count); -mutex_unlock (&tpkp->port_write_mutex); +spin_unlock_irqrestore (&tpkp->spinlock, flags);return ret; }
@@ -171,7 +174,7 @@ static int __init ttyprintk_init(void) {int ret = -ENOMEM ; -mutex_init (&tpk_port.port_write_mutex); +spin_lock_init (&tpk_port.spinlock); ttyprintk_driver = tty_alloc_driver(1, TTY_DRIVER_RESET_TERMIOS |
drivers/devfreq/devfreq.c +9 -0
@@ -1259,6 +1259,14 @@ int devfreq_remove_governor(struct devfreq_governor *governor) }EXPORT_SYMBOL (devfreq_remove_governor); +static ssize_t name_show (struct device *dev, +struct device_attribute *attr,char *buf) +{ +struct devfreq *devfreq =to_devfreq (dev); +return sprintf (buf,"%s\n" ,dev_name (devfreq->dev.parent)); +} +static DEVICE_ATTR_RO (name); +static ssize_t governor_show (struct device *dev,struct device_attribute *attr,char *buf) {
@@ -1592,6 +1600,7 @@ static ssize_t trans_stat_show(struct device *dev,static DEVICE_ATTR_RO (trans_stat);static struct attribute *devfreq_attrs[] = { + &dev_attr_name.attr, &dev_attr_governor.attr, &dev_attr_available_governors.attr, &dev_attr_cur_freq.attr,
drivers/media/usb/dvb-usb/af9005.c +1 -1
@@ -554,7 +554,7 @@ static int af9005_boot_packet(struct usb_device *udev, int type, u8 *reply, u8 *buf, int size) {u16 checksum; -int act_len, i, ret; +int act_len =0 , i, ret;memset (buf,0 , size); buf[0 ] = (u8) (FW_BULKOUT_SIZE &0xff );
drivers/media/usb/dvb-usb/digitv.c +7 -3
@@ -230,18 +230,22 @@ static struct rc_map_table rc_map_digitv_table[] = {static int digitv_rc_query (struct dvb_usb_device *d,u32 *event,int *state) { -int i; +int ret, i;u8 key[5 ];u8 b[4 ] = {0 }; *event =0 ; *state =REMOTE_NO_KEY_PRESSED ; -digitv_ctrl_msg (d,USB_READ_REMOTE ,0 ,NULL ,0 ,&key[1 ],4 ); + ret =digitv_ctrl_msg (d,USB_READ_REMOTE ,0 ,NULL ,0 , &key[1 ],4 ); +if (ret) +return ret;/* Tell the device we've read the remote. Not sure how necessary this is, but the Nebula SDK does it. */ -digitv_ctrl_msg (d,USB_WRITE_REMOTE ,0 ,b,4 ,NULL ,0 ); + ret =digitv_ctrl_msg (d,USB_WRITE_REMOTE ,0 , b,4 ,NULL ,0 ); +if (ret) +return ret;/* if something is inside the buffer, simulate key press */ if (key[1 ] !=0 )
drivers/media/usb/dvb-usb/dvb-usb-urb.c +1 -1
@@ -12,7 +12,7 @@int dvb_usb_generic_rw (struct dvb_usb_device *d,u8 *wbuf,u16 wlen,u8 *rbuf,u16 rlen,int delay_ms) { -int actlen,ret = -ENOMEM ; +int actlen =0 , ret = -ENOMEM ;if (!d || wbuf ==NULL || wlen ==0 )return -EINVAL ;
drivers/media/usb/dvb-usb/vp7045.c +14 -7
@@ -96,10 +96,14 @@ static int vp7045_power_ctrl(struct dvb_usb_device *d, int onoff)static int vp7045_rc_query (struct dvb_usb_device *d) { +int ret;u8 key; -vp7045_usb_op (d,RC_VAL_READ ,NULL ,0 ,&key,1 ,20 ); -deb_rc ("remote query key: %x %d\n" ,key,key); + ret =vp7045_usb_op (d,RC_VAL_READ ,NULL ,0 , &key,1 ,20 ); +if (ret) +return ret; + +deb_rc ("remote query key: %x\n" , key);if (key !=0x44 ) {/*
@@ -115,15 +119,18 @@ static int vp7045_rc_query(struct dvb_usb_device *d)static int vp7045_read_eeprom (struct dvb_usb_device *d,u8 *buf,int len,int offset) { -int i =0 ; -u8 v,br[2 ]; +int i, ret; +u8 v, br[2 ];for (i=0 ; i < len; i++) { v = offset + i; -vp7045_usb_op (d,GET_EE_VALUE ,&v,1 ,br,2 ,5 ); + ret =vp7045_usb_op (d,GET_EE_VALUE , &v,1 , br,2 ,5 ); +if (ret) +return ret; + buf[i] = br[1 ]; } -deb_info ("VP7045 EEPROM read (offs: %d, len: %d) : " ,offset, i); -debug_dump (buf,i,deb_info); +deb_info ("VP7045 EEPROM read (offs: %d, len: %d) : " , offset, i); +debug_dump (buf, i, deb_info);return 0 ; }
drivers/media/usb/gspca/gspca.c +1 -1
@@ -1461,7 +1461,7 @@ int gspca_dev_probe2(struct usb_interface *intf,pr_err ("couldn't kzalloc gspca struct\n" );return -ENOMEM ; } - gspca_dev->usb_buf =kmalloc (USB_BUF_SZ ,GFP_KERNEL ); + gspca_dev->usb_buf =kzalloc (USB_BUF_SZ ,GFP_KERNEL );if (!gspca_dev->usb_buf) {pr_err ("out of memory\n" ); ret = -ENOMEM ;
fs/btrfs/super.c +9 -1
@@ -2104,7 +2104,15 @@ static int btrfs_statfs(struct dentry *dentry, struct kstatfs *buf)*/ thresh =SZ_4M ; -if (!mixed && total_free_meta - thresh < block_rsv->size) +/* +* We only want to claim there's no available space if we can no longer +* allocate chunks for our metadata profile and our global reserve will +* not fit in the free metadata space. If we aren't ->full then we +* still can allocate chunks and thus are fine using the currently +* calculated f_bavail. +*/ +if (!mixed && block_rsv->space_info->full && + total_free_meta - thresh < block_rsv->size) buf->f_bavail =0 ; buf->f_type =BTRFS_SUPER_MAGIC ;
fs/cifs/smb2pdu.c +1 -1
@@ -312,7 +312,7 @@ smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon)if (server->tcpStatus != CifsNeedReconnect)break ; -if (--retries) +if (retries && --retries)continue ;/*
fs/gfs2/lops.c +44 -24
116 lines not on this page · raw message
fs/namei.c +2 -2
@@ -3202,8 +3202,8 @@ static int do_last(struct nameidata *nd, struct file *file, const struct open_flags *op) { struct dentry *dir = nd->path.dentry; -kuid_t dir_uid = dir->d_inode->i_uid; -umode_t dir_mode = dir->d_inode->i_mode; +kuid_t dir_uid = nd->inode->i_uid; +umode_t dir_mode = nd->inode->i_mode;int open_flag = op->open_flag;bool will_truncate = (open_flag &O_TRUNC ) !=0 ;bool got_write = false;
fs/reiserfs/super.c +2 -0
@@ -629,6 +629,7 @@ static void reiserfs_put_super(struct super_block *s)reiserfs_write_unlock (s);mutex_destroy (&REISERFS_SB (s)->lock);destroy_workqueue (REISERFS_SB (s)->commit_wq); +kfree (REISERFS_SB (s)->s_jdev);kfree (s->s_fs_info); s->s_fs_info =NULL ; }
@@ -2240,6 +2241,7 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) kfree(qf_names[j]); }#endif +kfree (sbi->s_jdev);kfree (sbi); s->s_fs_info =NULL ;
kernel/cgroup/cgroup.c +6 -5
@@ -3055,8 +3055,6 @@ static int cgroup_apply_control_enable(struct cgroup *cgrp)for_each_subsys (ss, ssid) {struct cgroup_subsys_state *css =cgroup_css (dsct, ss); -WARN_ON_ONCE (css &&percpu_ref_is_dying (&css->refcnt)); -if (!(cgroup_ss_mask (dsct) & (1 << ss->id)))continue ;
@@ -3066,6 +3064,8 @@ static int cgroup_apply_control_enable(struct cgroup *cgrp)return PTR_ERR (css); } +WARN_ON_ONCE (percpu_ref_is_dying (&css->refcnt)); +if (css_visible (css)) { ret =css_populate_dir (css);if (ret)
@@ -3101,11 +3101,11 @@ static void cgroup_apply_control_disable(struct cgroup *cgrp)for_each_subsys (ss, ssid) {struct cgroup_subsys_state *css =cgroup_css (dsct, ss); -WARN_ON_ONCE (css &&percpu_ref_is_dying (&css->refcnt)); -if (!css)continue ; +WARN_ON_ONCE (percpu_ref_is_dying (&css->refcnt)); +if (css->parent && !(cgroup_ss_mask (dsct) & (1 << ss->id))) {kill_css (css);
@@ -3392,7 +3392,8 @@ static ssize_t cgroup_type_write(struct kernfs_open_file *of, char *buf,if (strcmp (strstrip (buf),"threaded" ))return -EINVAL ; - cgrp =cgroup_kn_lock_live (of->kn, false); +/* drain dying csses before we re-apply (threaded) subtree control */ + cgrp =cgroup_kn_lock_live (of->kn, true);if (!cgrp)return -ENOENT ;
lib/test_bitmap.c +5 -4
@@ -275,22 +275,23 @@ static void __init test_copy(void)static void __init test_replace (void ) {unsigned int nbits =64 ; +unsigned int nlongs =DIV_ROUND_UP (nbits,BITS_PER_LONG );DECLARE_BITMAP (bmap,1024 );bitmap_zero (bmap,1024 ); -bitmap_replace (bmap, &exp2[0 ], &exp2[1 ], exp2_to_exp3_mask, nbits); +bitmap_replace (bmap, &exp2[0 * nlongs], &exp2[1 * nlongs], exp2_to_exp3_mask, nbits);expect_eq_bitmap (bmap, exp3_0_1, nbits);bitmap_zero (bmap,1024 ); -bitmap_replace (bmap, &exp2[1 ], &exp2[0 ], exp2_to_exp3_mask, nbits); +bitmap_replace (bmap, &exp2[1 * nlongs], &exp2[0 * nlongs], exp2_to_exp3_mask, nbits);expect_eq_bitmap (bmap, exp3_1_0, nbits);bitmap_fill (bmap,1024 ); -bitmap_replace (bmap, &exp2[0 ], &exp2[1 ], exp2_to_exp3_mask, nbits); +bitmap_replace (bmap, &exp2[0 * nlongs], &exp2[1 * nlongs], exp2_to_exp3_mask, nbits);expect_eq_bitmap (bmap, exp3_0_1, nbits);bitmap_fill (bmap,1024 ); -bitmap_replace (bmap, &exp2[1 ], &exp2[0 ], exp2_to_exp3_mask, nbits); +bitmap_replace (bmap, &exp2[1 * nlongs], &exp2[0 * nlongs], exp2_to_exp3_mask, nbits);expect_eq_bitmap (bmap, exp3_1_0, nbits); }
mm/mempolicy.c +3 -3
@@ -2821,6 +2821,9 @@ int mpol_parse_str(char *str, struct mempolicy **mpol)char *flags =strchr (str,'=' );int err =1 , mode; +if (flags) + *flags++ ='\0' ;/* terminate mode string */ +if (nodelist) {/* NUL-terminate mode or flags string */ *nodelist++ ='\0' ;
@@ -2831,9 +2834,6 @@ int mpol_parse_str(char *str, struct mempolicy **mpol) }else nodes_clear (nodes); -if (flags) - *flags++ ='\0' ;/* terminate mode string */ - mode =match_string (policy_modes,MPOL_MAX , str);if (mode <0 ) goto out;
net/bluetooth/hci_sock.c +3 -0
@@ -831,6 +831,8 @@ static int hci_sock_release(struct socket *sock)if (!sk)return 0 ; +lock_sock (sk); +switch (hci_pi (sk)->channel) {case HCI_CHANNEL_MONITOR :atomic_dec (&monitor_promisc);
@@ -878,6 +880,7 @@ static int hci_sock_release(struct socket *sock)skb_queue_purge (&sk->sk_receive_queue);skb_queue_purge (&sk->sk_write_queue); +release_sock (sk);sock_put (sk);return 0 ; }
security/tomoyo/common.c +4 -7
@@ -2322,9 +2322,9 @@ static const char * const tomoyo_memory_headers[TOMOYO_MAX_MEMORY_STAT] = { [TOMOYO_MEMORY_QUERY] = "query message:", }; -/* Timestamp counter for last updated. */ -static unsigned int tomoyo_stat_updated[TOMOYO_MAX_POLICY_STAT ];/* Counter for number of updates. */ +static atomic_t tomoyo_stat_updated[TOMOYO_MAX_POLICY_STAT ]; +/* Timestamp counter for last updated. */ static time64_t tomoyo_stat_modified[TOMOYO_MAX_POLICY_STAT ];/**
@@ -2336,10 +2336,7 @@ static time64_t tomoyo_stat_modified[TOMOYO_MAX_POLICY_STAT];*/ void tomoyo_update_stat (const u8 index) { -/* -* I don't use atomic operations because race condition is not fatal. -*/ - tomoyo_stat_updated[index]++; +atomic_inc (&tomoyo_stat_updated[index]); tomoyo_stat_modified[index] =ktime_get_real_seconds (); }
@@ -2360,7 +2357,7 @@ static void tomoyo_read_stat(struct tomoyo_io_buffer *head)for (i =0 ; i <TOMOYO_MAX_POLICY_STAT ; i++) {tomoyo_io_printf (head,"Policy %-30s %10u" , tomoyo_policy_headers[i], - tomoyo_stat_updated[i]); +atomic_read (&tomoyo_stat_updated[i]));if (tomoyo_stat_modified[i]) {struct tomoyo_time stamp;
tools/include/linux/string.h +8 -0
@@ -17,7 +17,15 @@ int strtobool(const char *s, bool *res);* However uClibc headers also define __GLIBC__ hence the hack below */ #if defined(__GLIBC__) && !defined(__UCLIBC__) +// pragma diagnostic was introduced in gcc 4.6 +#if __GNUC__ >4 || (__GNUC__ ==4 && __GNUC_MINOR__ >=6 ) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wredundant-decls" +#endif extern size_t strlcpy (char *dest,const char *src,size_t size); +#if __GNUC__ >4 || (__GNUC__ ==4 && __GNUC_MINOR__ >=6 ) +#pragma GCC diagnostic pop +#endif #endif char *str_error_r (int errnum,char *buf,size_t buflen);
tools/lib/string.c +7 -0
@@ -96,6 +96,10 @@ int strtobool(const char *s, bool *res)* If libc has strlcpy() then that version will override this * implementation: */ +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wignored-attributes" +#endif size_t __weak strlcpy (char *dest,const char *src,size_t size) {size_t ret =strlen (src);
@@ -107,6 +111,9 @@ size_t __weak strlcpy(char *dest, const char *src, size_t size) }return ret; } +#ifdef __clang__ +#pragma clang diagnostic pop +#endif /** * skip_spaces - Removes leading whitespace from @str.
tools/perf/builtin-c2c.c +6 -4
@@ -595,8 +595,8 @@ tot_hitm_cmp(struct perf_hpp_fmt *fmt __maybe_unused, {struct c2c_hist_entry *c2c_left;struct c2c_hist_entry *c2c_right; -unsigned int tot_hitm_left; -unsigned int tot_hitm_right; +uint64_t tot_hitm_left; +uint64_t tot_hitm_right; c2c_left = container_of(left, struct c2c_hist_entry, he); c2c_right = container_of(right, struct c2c_hist_entry, he);
@@ -629,7 +629,8 @@ __f ## _cmp(struct perf_hpp_fmt *fmt __maybe_unused, \ \ c2c_left = container_of(left, struct c2c_hist_entry, he); \ c2c_right = container_of(right, struct c2c_hist_entry, he); \ -return c2c_left->stats.__f - c2c_right->stats.__f; \ +return (uint64_t ) c2c_left->stats.__f - \ + (uint64_t ) c2c_right->stats.__f; \ }#define STAT_FN (__f) \
@@ -682,7 +683,8 @@ ld_llcmiss_cmp(struct perf_hpp_fmt *fmt __maybe_unused, c2c_left = container_of(left, struct c2c_hist_entry, he); c2c_right = container_of(right, struct c2c_hist_entry, he); -return llc_miss (&c2c_left->stats) -llc_miss (&c2c_right->stats); +return (uint64_t )llc_miss (&c2c_left->stats) - + (uint64_t )llc_miss (&c2c_right->stats); }static uint64_t total_records (struct c2c_stats *stats)